double m = iStochastic(Symbol(),0,stochKperiod,stochDperiod,stochSlowing,stochMethod,0,0,0); double s=iStochastic(Symbol(),0,stochKperiod,stochDperiod,stochSlowing,stochMethod,0,1,0); double m1 = iStochastic(Symbol(),0,stochKperiod,stochDperiod,stochSlowing,stochMethod,0,0,1); double s1=iStochastic(Symbol(),0,stochKperiod,stochDperiod,stochSlowing,stochMethod,0,1,1); if(m>s&&m1<=s1 || m<s&&m1>=s1)Alert("Stoch Cross over");
bool positiveCurr = m > 0, positivePrev = m1 > 0, crossed = positiveCurr != positivePrev;
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
how to detect Stoch Cross Over?
is this correct?
stochMain = iStochastic(Symbol(),0,stochKperiod,stochDperiod,stochSlowing,stochMethod,0,0,0);
if(stochMain==stochSignal)//stoch cross each otherstochSignal=iStochastic(Symbol(),0,stochKperiod,stochDperiod,stochSlowing,stochMethod,0,1,0);
{
Alert("Stoch Cross over");
}