Heys guys plz can some one help me as my ea compiles perfect but does not take a trade when i set these values for the indicator.
but if i change it to if (arrowup > 0.0001) then takes trade like crazy so i know the buy and sell fuction work.
please if any one can help.
This ugly number you have in your code has pretty name in MQL - EMPTY_VALUE. It is default value used for "no value in the buffer at this point"
This code goes through last 100 candles and prints value of up/down arrow if indicator value is not equal to EMPTY_VALUE:
for(int i = 0; i < 100; i++) { double arrowup=iCustom(NULL,0,"BB60SEC",0,i); double arrowdown=iCustom(NULL,0,"BB60SEC",1,i); string out = ""; if(arrowup != EMPTY_VALUE) out += StringFormat(" UP: %f", arrowup); if(arrowdown != EMPTY_VALUE) out += StringFormat(" DOWN: %f", arrowdown); if(StringLen(out) > 0) Print(out); }
Your code will call SellOrder() function if there is an down arrow on the chart.
You should inspect SellOrder() function for bugs. Do you have error checking when you call OrderSend() ?
This ugly number you have in your code has pretty name in MQL - EMPTY_VALUE. It is default value used for "no value in the buffer at this point"
This code goes through last 100 candles and prints value of up/down arrow if indicator value is not equal to EMPTY_VALUE:
Your code will call SellOrder() function if there is an down arrow on the chart.
You should inspect SellOrder() function for bugs. Do you have error checking when you call OrderSend() ?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Heys guys plz can some one help me as my ea compiles perfect but does not take a trade when i set these values for the indicator.
but if i change it to if (arrowup > 0.0001) then takes trade like crazy so i know the buy and sell fuction work.
please if any one can help.