Indicators: SuperTrend - page 2

 
Excellent recreation of the original indicator and dose the job perfectly, big ups.
 

hi i cant get downtren with ea only uptrend can be read. any idea?


i can only read uptrend and downtrend always return EMPTY_VALUE (2456.....) my code for reading them is this:


double uptrend = iCustom(_Symbol,_Period,"SuperTrend",10,3,0,0);
Print(uptrend); // currect answer and always have a value
double downtrend = iCustom(_Symbol,_Period,"SuperTrend",10,3,1,0);
Print(downtrend); // EMPTY_VALUE
// as you can see in the indicator :
// iCustom(_Symbol,_Period,"SuperTrend",atrPeriod,atrFactor,buffer_index,shift);
// buffer_index: 0-uptrend , 1-downtrend 


chart datawindow shows the correct answer when trend is changing from up to down trend the "downtrend" and "uptrend" get value and then after few candles uptrend value  EMPTY_VALUE  but not in the EA when i want to get them the uptrend always have a value and down trend never have a value

 

Hi


Does this repaint?

 
This indicator is not working in the strategietester, isn't it?
Reason: