Hello Guys, I am using following code for intraday scanning , it works fine. But when I want to use it for Daily , I am unable to code this please help.
Now 300,900,1800 is the second for intraday . What I have to write in place of them for coding in Daily, 3day, 6day timeframe.. Please Help
HTML:
function MyMTFfunc( timeframe, expandmode )
{
TimeFrameSet( timeframe );
a = StochK( periods = 14, ksmooth = 3 );
b = StochD( periods = 14, Ksmooth = 3, Dsmooth = 3 ) ;
D1 = a<1000;
TimeFrameRestore();
VarSet( "K" + timeframe, TimeFrameExpand( a, timeframe, expandmode ) );
VarSet( "D" + timeframe, TimeFrameExpand( b, timeframe, expandmode ) );
return TimeFrameExpand( D1, timeframe, expandmode );
}
expandmode = expandLast;
TF1 = MyMTFfunc( inDaily, expandmode );
TF2 = MyMTFfunc( 3*inDaily, expandmode );
TF3 = MyMTFfunc( 6*inDaily, expandmode );
k1 = K300; //300 for 5min
k2 = K900; //900 for 15min
k3 = K1800;//1800 for 30min
d1 = D300;
d2 = D900;
d3 = D1800;
........... //Rest of coding