Download MetaTrader 5

Trend setting

To add comments, please log in or register
jan potuzak
9
jan potuzak  

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
16076
whroeder1  
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  

I got it, thanks :)

To add comments, please log in or register