_N(Title = StrFormat("{{NAME}} -"+ EncodeColor(colorBlue)+""+ EncodeColor(colorBlue)+" {{INTERVAL}} "+ EncodeColor(colorWhite)+"{{DATE}} \n Op=> %g, \n Hi=> %g, \n Lo=> %g, \n Cl=> %g, \n
{{VALUES}}", O, H, L, C));
Plot( C, "", ParamColor("Color", colorBlack ), ParamStyle("Style",styleCandle,maskAll) );
i=Interval(0);
a=IIf(i==3600,1,IIf(i==900,4,IIf(i==300,12,IIf(i==60,60,i/60))));
Hh=ValueWhen(TimeNum()==101500,HHV(H,a));
Ll=ValueWhen(TimeNum()==101500,LLV(L,a));
Cc=ValueWhen(TimeNum()==101500,C );
P = (Hh + Ll + Cc)/3;
R2 = P + (Hh-Ll);
R1 = (P*2) - Ll;
S1 = (P*2) - Hh;
S2 = P - (Hh-Ll);
Plot( p," \nPiv : ", ParamColor( "Piv Color", colorYellow ), ParamStyle("piv Style", styleDashed) );
if( ParamToggle("Plot S1 - R1", "No|Yes", 0));
{
Plot( R1," \nR1 : ", ParamColor( "R1 Color", colorPaleGreen ), ParamStyle("R1 Style",styleLine | styleDashed) );
Plot( S1," \nS1 : ", ParamColor( "S1 Color", colorOrange), ParamStyle("S1 Style",styleLine | styleDashed) );
}
if( ParamToggle("Plot S2 - R2", "No|Yes", 0));
{
Plot( R2," \nR2 : ", ParamColor( "R2 Color", colorBrightGreen ), ParamStyle("R2 Style",styleLine | styleDashed) );
Plot( S2," \nS2 : ", ParamColor( "S2 Color", colorRed), ParamStyle("S2 Style",styleLine | styleDashed) );
}