Download MetaTrader 5
To add comments, please log in or register
Use searching on MQL5.community. It is easy!
jan potuzak
9
jan potuzak 2015.10.23 16:28 

Hi,

does anybody got some idea how to fix the trend in custom indicator ??

For example, If indicator made six lines above value 100, say there is Uptrend. 

Then I need program, to do not get back to upper functuion "if"  unless Uptrend is cancelled by some event in the indicator..

thank you for all ideas... 

whroeder1
13644
whroeder1 2015.10.23 16:35  
Don't look for a level, look for a change in signal
static bool uptrend = false;
bool upTrendPrev = uptrend; uptrend = YOURCONDITION;
if(upTrend && ! upTrendPrev) CHANGED;
jan potuzak
9
jan potuzak 2015.10.23 16:41  

I got it, thanks :)

/
To add comments, please log in or register