_SECTION_BEGIN("Background_Setting");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
ParamColor("BgBottom", colorDarkGrey),ParamColor("TitleBack",colorBlack));
SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
SetChartOptions(0,chartShowArrows|chartShowDates);
SetBarsRequired(sbrAll,sbrAll);
_SECTION_END();
_SECTION_BEGIN("Time Calculation");
beginTradeTime = ParamTime( "Start Time ", "9:15:00" );
endTradeTime = ParamTime( "End Time ", "9:30:00" );
tn = TimeNum();
timecond = tn >= beginTradeTime AND tn <= endTradeTime ;
//Plot( timecond, "", colorDarkGrey, styleArea|styleOwnScale,0,1);
CR15High = deTimeRangeHHV(H,beginTradeTime ,endTradeTime );
CR15Low = deTimeRangeLLV(L,beginTradeTime ,endTradeTime );
CR15Clos = deValueWhenTime(C,endTradeTime );
pp= (Cr15high+Cr15low+Cr15clos)/3;
Today = LastValue(Day());
Plot(IIf(Today == Day(),CR15High ,Null),"",colorBrightGreen,styleLine );
Plot(IIf(Today == Day(),CR15Low ,Null),"",colorOrange,styleLine );
Plot(IIf(Today == Day(),CR15clos ,Null),"",colorBlue,styleLine );
Plot(IIf(Today == Day(),CR15clos ,Null),"",colorBlue,styleLine );
Plot(IIf(Today == Day(),pp ,Null),"",colorSkyblue,styleLine );
_SECTION_END();
_SECTION_BEGIN("Price");
SetBarFillColor(IIf(C>pp ,ParamColor("Candle Up Color", colorBrightGreen),IIf(C<pp ,ParamColor("Candle Down Color", colorRed),colorLightGrey)));
Plot(C,"close",IIf(C>pp ,ParamColor("Shadow Up Color", colorBlack),IIf(C<pp ,ParamColor("Shadow Down Color", colorBlack),colorLightGrey)),64,0,0,0,0);
GraphXSpace=Param("GraphXSpace",20,-10,25,1);
_SECTION_END();
_SECTION_BEGIN("Title");
Title =
EncodeColor(colorBrightGreen)+ "Day 1st 15 min Pivot \n" + Name() + " : " + EncodeColor(colorBrightGreen)+ Interval(2)
+EncodeColor(colorBrightGreen) + " : " + Date() +"\n\n"
+EncodeColor(colorBrightGreen) + "1st 15 min Hi = " + EncodeColor(colorBrightGreen) + NumToStr(CR15High ,1.2) + "\n"
+EncodeColor(colorOrange) + "1st 15 min Lo = " + EncodeColor(colorOrange) + NumToStr(CR15Low ,1.2) + "\n"
+EncodeColor(colorBlue) + "1st 15 min Close = " + EncodeColor(colorBlue) + NumToStr(Cr15clos ,1.2) + "\n"
+EncodeColor(colorSkyblue) + "1st 15 min Pivot = " + EncodeColor(colorSkyblue) + NumToStr(pp,1.2);
_SECTION_END();