No errors or warning when i compile the code but buy/sell orders are not sending when i backtest it. simple ema sma crossover. please help if you can, thank you.
- Need help for below ea
- Zigzag indicators
- zero error ,zero warning ,but no trade
What do you see, when you print the ticket nr?
daybyter:
What do you see, when you print the ticket nr?
what do you mean by print the ticket nr? i apologize as i am relatively new to coding especially with mql4
What do you see, when you print the ticket nr?
Print("Ticket is: ",ticket);
Is it bigger than -1 ?
mlundin04:
what do you mean by print the ticket nr? i apologize as i am relatively new to coding especially with mql4
you need to separately display the verification messages about the signal and the opening of the order, for example:what do you mean by print the ticket nr? i apologize as i am relatively new to coding especially with mql4
if(PreviousEMA<PreviousSMA && CurrentEMA>CurrentSMA) { Print("Signal to SELL"); if (OrdersTotal()==0) { int ticket = OrderSend(Symbol(),OP_SELL,LotSize,Ask,3,Ask-(StopLoss*pips),Ask+(TakeProfit*pips),NULL,0,0,Green); if(ticket > 0) Print("Order SELL ticket=", ticket); else Print("Error to order SELL"); } }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register