Hi,
Some of you will say - keep trying, been at it for over 2 months -my coding skills are poor !
This time am posting the formula - till it basically works - first a screen shot depicting on an hourly chart
of thr Nifty 50 - the standard RSI in hourly [ time frame of the chart], daily and weekly time frames:
the code is:
_SECTION_BEGIN("RSI");
SetChartOptions(0,chartHideQuoteMarker);
GraphLabelDecimals = 2;
GraphXSpace = 10;
R = RSI(14);
Plot(R," RSI(14),", colorBlue, styleLine | styleThick );
PlotOHLC( R,R,50,R, "", IIf( r > 50, colorPink, colorPaleGreen ), styleCloud | styleNoLabel | styleClipMinMax, 30, 70,0,-2 );
plotDLY = ParamToggle("DAILY","OFF|ON",0);
plotWKLY = ParamToggle("WEEKLY","OFF|ON",0);
TimeFrameSet(inDaily);
RsiDly = RSI(14);
TimeFrameRestore();
TimeFrameSet(inWeekly);
RsiWKLY = RSI(14);
TimeFrameRestore();
if(plotDLY )
{
Plot(TimeFrameExpand(RsiDly,inDaily),"\nRsi-Dly" ,colorCustom12,styleLine| styleThick );
}
if(plotWKLY)
{
Plot(TimeFrameExpand(Rsiwkly,inWeekly),"\nRsi-WKLY" ,colorCustom16,styleLine| styleThick );
}
PlotGrid(60,colorLightYellow); PlotGrid(40,colorLightYellow);
GfxSetZOrder( -2 );
GfxSetCoordsMode( 1 );
GfxSelectSolidBrush( colorPaleGreen); // fill color
GfxRectangle (BarCount-15, 60, BarCount+5, 40 );
GfxSelectPen( colorLightYellow,0 );
GfxMoveTo(BarCount-15, 50); GfxLineTo(BarCount+5,50 );
GfxSelectPen( colorRed, 1 );
GfxMoveTo(BarCount-15, 70); GfxLineTo(BarCount+5,70 );
GfxSelectPen( colorGreen, 1 );
GfxMoveTo(BarCount-15, 30); GfxLineTo(BarCount+5,30 );
_SECTION_END();
OK till now, now if I change the chart time frame to daily, the RSI on this, daily, time frame plots in BLUE color, since param "daily" is still on the daily RSI[from the afl alsi plots as a magenta line for the current day. screent shot below:
IS THERE ANY WAY TO AUTOMATICALLY TURN OF THE RSI, without having to go to "Parameters" to turn off the param selection for that time frame.