_SECTION_BEGIN("Price1");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Fibo");
FibCol= colorBlue ;
FibExt=colorRed;
YH=TimeFrameGetPrice("H", inDaily, -1);
YL=TimeFrameGetPrice("L", inDaily, -1);
Yo=TimeFrameGetPrice("O", inDaily, -1);
Yc=TimeFrameGetPrice("C", inDaily, -1);
DD=Prec(C-Yc,2);
xx=Prec((DD/Yc)*100,2);
numbars = LastValue(Cum(Status("barvisible")));
hts = -120;
Today = LastValue(Day());
fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2);
Line0=YL;
Line100=YH;
Line1 = Line0 + abs(Line100-Line0)*0.236;
Line2 = Line0 + abs(Line100-Line0)*0.382;
Line3 = Line0 + abs(Line100-Line0)*0.5;
Line4 = Line0 + abs(Line100-Line0)*0.618;
Line5= Line0 + abs(Line100-Line0)*0.786;
Line6= Line0 + abs(Line100-Line0)*1.236;
Line7= Line0 + abs(Line100-Line0)*1.382;
Line8= Line0 + abs(Line100-Line0)*1.5;
Line9= Line0 + abs(Line100-Line0)*1.618;
Line10= Line0 + abs(Line100-Line0)*1.786;
Line11= Line0 + abs(Line100-Line0)*2;
Plot(IIf(Today == Day(),YL,Null), "0%",FibCol,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line1,Null), "23.6%",FibCol,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line2,Null), "38.2%",FibCol,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line3,Null), "50%",FibCol,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line4,Null), "61.8%",FibCol,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line5,Null), "78.6%",FibCol,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line6,Null), "23.6 %",FibExt,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line7,Null), "38.2%",FibExt,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line8,Null), "50%",FibExt,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line9,Null), "61.8%",FibExt,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line10,Null), "78.6 %",FibExt,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),Line11,Null), "100%",FibExt,styleDashed |styleNoRescale|styleNoTitle);
Plot(IIf(Today == Day(),YH,Null), "100%",FibCol,styleDashed |styleNoRescale|styleNoTitle);
PlotText("0%= " + WriteVal(YL,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (YL,1) , FibCol);
PlotText("23.6%= " + WriteVal(Line1,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line1,1) , FibCol);
PlotText("38.2%=" + WriteVal(Line2,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line2,1) , FibCol);
PlotText("50%= " + WriteVal(Line3,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line3,1) , FibCol);
PlotText("61.8%= " + WriteVal(Line4,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line4,1) , FibCol);
PlotText("78.6%= " + WriteVal(Line5,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line5,1) , FibCol);
PlotText("100%= " + WriteVal(YH,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (YH,1) , FibCol);
PlotText("23.6%= " + WriteVal(Line6,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line6,1) , FibExt);
PlotText("38.2%= " + WriteVal(Line7,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line7,1) , FibExt);
PlotText("50%= " + WriteVal(Line8,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line8,1) , FibExt);
PlotText("61.8%= " + WriteVal(Line9,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line9,1) , FibExt);
PlotText("78.6%= " + WriteVal(Line10,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line10,1) , FibExt);
PlotText("100%= " + WriteVal(Line11,fraction),LastValue(BarIndex())-(numbars/hts),LastValue (Line11,1) , FibExt);
_SECTION_END();