Can someone please help me figure out why my ea is placing multiple orders? It's supposed to place an order every time the histogram crosses the zero line but it's placing trades after the first one is closed.
Thanks for your help...
R
have you coded it to place a trade if the indy crosses 0 ....or if the last candle was below 0 and current candle is above 0...
for example : double lastcandle = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,2)
double newcandle = double lastcandle = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1)
now use it to limit orders to only a 0 cross...like this :
//For a buy
if(lascandle<0&&newcandle>0)
{
Ordersend(....)
}
//for a sell
if(lascandle>0&&newcandle<0)
{
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
Can someone please help me figure out why my ea is placing multiple orders? It's supposed to place an order every time the histogram crosses the zero line but it's placing trades after the first one is closed.
Thanks for your help...
R