Hi Guys! I am new to ProScreener and need some assistance in running a stochastic cross over. I use the Stochastic 14,1,3 set up to trade. I would like to know how to go about writing a code, which tells the screener to notify me, when the %D crosses over the %K or when the %D crosses under the % K on the 5 minutes time frame. The current code I am running is not getting any hits- see below.
TIMEFRAME(5minutes)
C1 = Average[3](Stochastic[14,1](Close)>(Stochastic[14,1](Close)))
SCREENER[C1]
Can I get some assistance please?
JSParticipant
Senior
Hi,
%K is fast line
%D is smoothed line
StoK=Stochastic[14,1](Close)//%K
StoD=Average[3](StoK)//%D
CrossUp=(StoD>StoK) AND (StoD[1]<=StoK[1]) // %D crosses over %K
CrossDown=(StoD<StoK) AND (StoD[1]>=StoK[1]) // %D crosses under %K
Crossings=CrossUp or CrossDown
Screener[Crossings](StoK as "%K", StoD as "%D")
Thanks for the code JS! Much appreciated and my apologies for the delay in thanking you!