How to teach an EA not to trade in certail circumstances?

 
drbmgojanur:
please give me ideas or any links for such programming in MQL5
Which circumstances ?
 
drbmgojanur:
please give me ideas or any links for such programming in MQL5
Look here: Broad answer to a non-specific question
 

if conditions then

do this

else do that

 
angevoyageur:
Which circumstances ?
like when market is trending or not trending
 
doshur:

if conditions then

do this

else do that

thanks ,like a zen answer i take n try it :)
 
drbmgojanur:
like when market is trending or not trending
Simply detect when the market is in a trend
 
drbmgojanur:
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 . . . 

 
RaptorUK:

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 . . . 

Do you see that ! Programming is so easy
 
angevoyageur:
Do you see that ! Programming is so easy
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
 
bachapk:
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
Most things are relative . . .  coding is simple compared to formulating a winning trading strategy . . .  IMO.  Most people think the other way around . . .  I wonder who is right ?
Reason: