OrderSend is not in the init, not sure what a comment() has to do with the price of tea in china.
Here is the code snippet I use for new candle:
datetime PrevTime = 0; init ... deinit ... start datetime CurrTime = iTime(Symbol(),0,1); if( CurrTime != PrevTime ) { } // Do my trading evaluaton here PrevTime = Time[0];
LEHayes:
before it has even completed all of the display of indicators
i tought you output the info trough Comment();
i dont know your Ea, but should the trading evaluation not be inside the {}?
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
In my EA, I have it set to trade on every new candle. With the trade methods behind the time checker, I would think that it would not fire any trades until the EA is fully loaded. So when it is closed and I open it, before it has even completed all of the display of indicators and before it has checked on the many limitation settings I have in it, I get new trades opening. Any suggestions on how to make it wait say 2 candles before opening any trades? What ever I do, I think it will have to happen in the init.