- If it is not possible to make an EA which can be left to work alone
- Will an automated trading Expert Advisor perform on a real account in a similar way as in the Strategy Tester?
- Your profitable EA contains how many lines of code?
please give me ideas or any links for such programming in MQL5
please give me ideas or any links for such programming in MQL5
if conditions then
do this
else do that
Which circumstances ?
if conditions then
do this
else do that
like when market is trending or not trending
![](https://c.mql5.com/3/19/rofl__18.gif)
like when market is trending or not trending
First define what you consider to be a trend, write it down in such detail that you can code it. Create a function, bool IsTrend() and code it with the information in your trend definition so that if there is a trend it returns true, otherwise it returns false.
Then in your code when you are about to place a trade first call IsTrend(), if it returns true place the trade, if not return . . .
First define what you consider to be a trend, write it down in such detail that you can code it. Create a function, bool IsTrend() and code it with the information in your trend definition so that if there is a trend it returns true, otherwise it returns false.
Then in your code when you are about to place a trade first call IsTrend(), if it returns true place the trade, if not return . . .
![](https://c.mql5.com/3/19/smile__11.gif)
If programming was easy then no one would pay programmers for their work. In-fact every one would be a programmer him/herself . Coming to the point: My answer would be exactly like RaptorUK
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use