How can I check stochastic crossover 80 between time period

#1
Hi

Please advice me. If i have time period 111659 and 112459 I want to check
between this time range have a stochastic crossover 80 yes or no.

How can check it
Kind regard
 

casoni

Well-Known Member
#2
Hi

Please advice me. If i have time period 111659 and 112459 I want to check
between this time range have a stochastic crossover 80 yes or no.

How can check it
Kind regard
Yup... check this



tn = TimeNum();
start1=ParamTime( "Start 1","11:15" );
etime1 = ParamTime( "End 1 ", "12:25" );
cond1 = (tn >= start1 AND tn <= etime1) ;
periods = Param( "Periods", 15, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Dsmooth = Param( "%D avg", 3, 1, 200, 1 );
st1=StochD( periods , Ksmooth, DSmooth );
Plot( st1, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
Plot(80,"Ob",31,32);
Plot(20,"Os",31,32);
Plot(cond1, "", 39, styleArea | styleOwnScale, 0, 1, 0, -1);
alert1= cond1 AND st1>80;
Plot(alert1,"",4,stylehistogram| styleOwnScale);
alert2= cond1 AND st1<20;
Plot(alert2,"",5,stylehistogram| styleOwnScale);
 

Similar threads