I made a step ma expert with the help of steve's shell (vey brilliant work).
I use this :
Code: Select all
int trendCurr = iCustom(s_symbol,StepMaTimeFrame,"Stepma",Length,Kv,StepSize,MA_Mode,Advance,Percentage,UpDownShift,HighLow,ColorMode,5,StepMaBarToTest );
int trendPrev = iCustom(s_symbol,StepMaTimeFrame,"Stepma",Length,Kv,StepSize,MA_Mode,Advance,Percentage,UpDownShift,HighLow,ColorMode,5,StepMaBarToTest+1);
if (trendCurr > 0 && trendPrev < 0) SendLong = true;
if (trendCurr < 0 && trendPrev > 0) SendShort = true;
If the price touch the stepma it enters in the way of the stepma color.
Thanks !