Hi all,

I tried to display a daily indicator on a weekly chart without any
success.  I would appreciate if someone can show me how.

Thanks in advance.



My attempt is listed below.



/*Intent is to display daily indicator on a weekly chart*/

//////////////////////////////////////////////////

TimeFrameSet( inDaily);

DailyGSPCClose = Foreign( "^GSPC", "C" ) ;

CrossBellow = IIf(MA(DailyGSPCClose ,10) < MA(DailyGSPCClose ,30) , 1 ,
0 ) ;

//Plot(CrossBellow ," ",IIf(CrossBellow == 0, colorDarkGreen,
colorRed),styleOwnScale|styleArea|styleNoLabel,-200,15);

StaticVarSet("BMD", CrossBellow);

TimeFrameRestore();

/////////////////////////////////////////////////////

/////////////////////////////////////////////////////

TimeFrameSet( inDaily);

temp = StaticVarGet("BMD");

BMW = TimeFrameCompress( temp , inWeekly );

StaticVarSet("BMDonW", BMW );

TimeFrameRestore();

/////////////////////////////////////////////////////

/////////////////////////////////////////////////////

TimeFrameSet( inWeekly);

temp1 = StaticVarGet("BMDonW");

Plot(temp1 ," ",IIf(temp1 == 0, colorDarkGreen,
colorRed),styleOwnScale|styleArea|styleNoLabel,-200,15);







Reply via email to