// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("ULTIMATE VOLATILITY EXPERT V.5"); //SetBarsRequired( sbrAll, sbrAll ); SetTradeDelays( 0, 0, 0, 0 ); SetOption( "CommissionMode", 3 ); SetOption( "CommissionAmount", 2.32 ); SetOption( "FuturesMode", True ); NumContracts = 1; PositionSize = NumContracts * MarginDeposit; SetOption( "MaxOpenPositions", 4 ); SetPositionSize(100,spsShares); LastBar = Day() != Ref( Day(), 1 ); /* tt = 000000; beginTradeTime = 000000 - tt; endTradeTime = 150000 - tt; timeWindowTrade = TimeNum() >= beginTradeTime AND TimeNum() <= endTradeTime; firstTradeBarOfDay = TimeNum() >= beginTradeTime; firstTradeBarOfDay = ( firstTradeBarOfDay - Ref( firstTradeBarOfDay, -1 ) ) == 1; lastTradeBarOfDay = TimeNum() >= endTradeTime; lastTradeBarOfDay = ( lastTradeBarOfDay - Ref( lastTradeBarOfDay, -1 ) ) == 1; ttt = IIf( firstTradeBarOfDay == 1, 1, 0 ) OR IIf( lastTradeBarOfDay == 1, 1, 0 ); */ procedure sys_proc( Buy, Short, BuyPrice, ShortPrice, BuyStop, BuyTarget1, BuyTarget2, BuyTarget3, ShortStop, ShortTarget1, ShortTarget2, ShortTarget3, lastBar, trendup, trenddn ) { global BuyAdjusted; global BuyPriceAdjusted; global ShortAdjusted; global ShortPriceAdjusted; global SellAdjusted; global SellPriceAdjusted; global CoverAdjusted; global CoverPriceAdjusted; global iBuyStop; global iShortStop; global iBuyTarget1; global iShortTarget1; global iBuyTarget2; global iShortTarget2; global iBuyTarget3; global iShortTarget3; BuyAdjusted = 0; BuyPriceAdjusted = 0; ShortAdjusted = 0; ShortPriceAdjusted = 0; SellAdjusted = 0; SellPriceAdjusted = 0; CoverAdjusted = 0; CoverPriceAdjusted = 0; iBuyStop = iBuyTarget1 = iBuyTarget2 = iBuyTarget3 = Null; iShortStop = iShortTarget1 = iShortTarget2 = iShortTarget3 = Null; longAllowed = 1; shortAllowed = 1; delay = 1; slip = TickSize * 0; for( i = 1; i < BarCount; i++ ) { if( Buy[i] AND longAllowed ) { islong = 1; BuyAdjusted[i] = 1; BuyPriceAdjusted[i] = BuyPrice[i] + slip; iBuyStop[i] = BuyStop[i]; iBuyTarget1[i] = BuyTarget1[i]; iBuyTarget2[i] = BuyTarget2[i]; iBuyTarget3[i] = BuyTarget3[i]; maxStop = BuyPriceAdjusted[i] - iBuyStop[i]; for( j = i + 1; j < BarCount; j++ ) { iBuyStop[j] = Max( iBuyStop[j - 1], C[j - 1] - maxStop ); iBuyTarget1[j] = iBuyTarget1[i]; iBuyTarget2[j] = iBuyTarget2[i]; iBuyTarget3[j] = iBuyTarget3[i]; if( lastbar[j] ) { SellAdjusted[j] = 1; SellPriceAdjusted[j] = O[j]; i = j; break; } else if( C[j] < iBuyStop[j] ) { SellAdjusted[j] = 1; SellPriceAdjusted[j] = C[j] - slip; longAllowed = 0; i = j; break; } /* else if( H[j] > iBuyTarget[j] ) { SellAdjusted[j] = 1; SellPriceAdjusted[j] = iBuyTarget[j] - slip; longAllowed = 0; i = j; break; } */ else if( j == BarCount - 1 ) { i = BarCount - 1; break; } } } if( Short[i] AND shortAllowed ) { ShortAdjusted[i] = 1; ShortPriceAdjusted[i] = ShortPrice[i] - slip; iShortStop[i] = ShortStop[i]; iShortTarget1[i] = ShortTarget1[i]; iShortTarget2[i] = ShortTarget2[i]; iShortTarget3[i] = ShortTarget3[i]; maxStop = iShortStop[i] - ShortPriceAdjusted[i]; for( j = i + 1; j < BarCount; j++ ) { iShortStop[j] = Min( iShortStop[j - 1], C[j - 1] + maxStop ); iShortTarget1[j] = iShorttarget1[i]; iShortTarget2[j] = iShorttarget2[i]; iShortTarget3[j] = iShorttarget3[i]; if( lastBar[j] ) { CoverAdjusted[j] = 1; CoverPriceAdjusted[j] = O[j]; i = j; break; } else if( C[j] > iShortStop[j] ) { CoverAdjusted[j] = 1; CoverPriceAdjusted[j] = C[j] + slip; shortAllowed = 0; i = j; break; } /* else if( L[j] < iShortTarget[j] ) { CoverAdjusted[j] = 1; CoverPriceAdjusted[j] = iShortTarget[j] + slip; shortAllowed = 0; i = j; break; } */ else if( j == BarCount - 1 ) { i = BarCount - 1; break; } } } if( lastBar[i] ) { longAllowed = 1; shortAllowed = 1; } if( trendup[i] AND !trendup[i - 1] ) { longAllowed = 1; } if( trenddn[i] AND !trenddn[i - 1] ) { shortAllowed = 1; } } } SetChartOptions( 0, chartShowArrows | chartShowDates ); SetChartBkColor( ParamColor( "bkcolor", ColorRGB( 0, 0, 0 ) ) ); NDays = Param( "Number of Days", 10, 1, 100, 1 ); TimeFrameSet( inDaily ); NDaysDHLAvg = Ref( MA( H - L, NDays ), -1 ); TimeFrameRestore(); NDaysDHLAvg = TimeFrameExpand( NDaysDHLAvg, inDaily, expandFirst ); ADM = NDaysDHLAvg; // Average Day Moment DayH = TimeFrameGetPrice( "H", inDaily, -1 ); DayL = TimeFrameGetPrice( "L", inDaily, -1 ); DayC = TimeFrameGetPrice( "C", inDaily, -1 ); DayO = TimeFrameGetPrice( "O", inDaily ); Buy = C > ( DayC + ( 0.25 * ADM ) ); Short = C < ( DayC - ( 0.25 * ADM ) ); BuyPrice = ValueWhen(Buy,C); ShortPrice = ValueWhen(Short,C); BuyTarget1 = ( 0.25 * ADM ) + BuyPrice; BuyTarget2 = ( 0.50 * ADM ) + BuyPrice; BuyTarget3 = ( 0.75 * ADM ) + BuyPrice; BuyStop = BuyPrice - ( 0.25 * ADM ); ShortTarget1 = ShortPrice - ( 0.25 * ADM ); ShortTarget2 = ShortPrice - ( 0.50 * ADM ); ShortTarget3 = ShortPrice - ( 0.75 * ADM ); ShortStop = ShortPrice + ( 0.25 * ADM ); trendup = IIf( C > ( ( DayC ) + ( ( .25 ) * ( ADM ) ) ), 1, 0 ); trenddn = IIf( C < ( ( DayC ) - ( ( .25 ) * ( ADM ) ) ), 1, 0 ); sys_proc( Buy, Short, BuyPrice, ShortPrice, BuyStop, BuyTarget1, BuyTarget2, BuyTarget3, ShortStop, ShortTarget1, ShortTarget2, ShortTarget3, lastBar, trendup, trenddn ); Buy = BuyAdjusted; BuyPrice = BuyPriceAdjusted; Short = ShortAdjusted; ShortPrice = ShortPriceAdjusted; Sell = SellAdjusted; SellPrice = SellPriceAdjusted; Cover = CoverAdjusted; CoverPrice = CoverPriceAdjusted; Long=Flip(Buy,Sell); Shrt=Flip(Short,Cover); PlotShapes(IIf(Buy == 1, shapeSquare, shapeNone),colorGreen, 0, L,-10); PlotShapes(IIf(Buy== 1, shapeSquare, shapeNone),colorLime, 0,L,-20); PlotShapes( IIf( Buy == 1, shapeUpArrow, shapeNone ), colorWhite, 0, L, -15 ); PlotShapes( IIf( Buy == 1, shapeSmallCircle, shapeNone ), colorWhite, 0, BuyPrice, 0 ); PlotShapes( IIf( Buy == sigScaleIn, shapeUpArrow, shapeNone ), colorWhite, 0, L, -15 ); PlotShapes( IIf( Buy == sigScaleIn, shapeSmallCircle, shapeNone ), colorWhite, 0, BuyPrice, 0 ); PlotShapes( IIf( Buy == sigScaleOut, shapeSmallDownTriangle, shapeNone ), colorWhite, 0, H, -15 ); PlotShapes( IIf( Buy == sigScaleOut, shapeSmallCircle, shapeNone ), colorWhite, 0, BuyPrice, 0 ); PlotShapes( IIf( Sell, shapeSmallDownTriangle, shapeNone ), colorWhite, 0, H, -15 ); PlotShapes( IIf( Sell, shapeSmallCircle, shapeNone ), colorWhite, 0, SellPrice, 0 ); PlotShapes(IIf(Short == 1, shapeSquare, shapeNone),colorRed, 0, H, 10); PlotShapes(IIf(Short == 1, shapeSquare, shapeNone),colorOrange, 0,H, 20); PlotShapes( IIf( Short == 1, shapeDownArrow, shapeNone ), colorWhite, 0, H, IIf( Short AND Sell, -30, -15 ) ); PlotShapes( IIf( Short == 1, shapeSmallCircle, shapeNone ), colorWhite, 0, ShortPrice, 0 ); PlotShapes( IIf( Short == sigScaleIn, shapeDownArrow, shapeNone ), colorWhite, 0, H, -15 ); //IIf( Short AND Sell, -30, -15 ) ); PlotShapes( IIf( Short == sigScaleIn, shapeSmallCircle, shapeNone ), colorWhite, 0, ShortPrice, 0 ); PlotShapes( IIf( Short == sigScaleOut, shapeSmallUpTriangle, shapeNone ), colorWhite, 0, L, -15 ); //IIf( Short AND Sell, -30, -15 ) ); PlotShapes( IIf( Short == sigScaleOut, shapeSmallCircle, shapeNone ), colorWhite, 0, ShortPrice, 0 ); PlotShapes( IIf( Cover, shapeSmallUpTriangle, shapeNone ), colorWhite, 0, L, IIf( Cover AND Buy, -30, -15 ) ); PlotShapes( IIf( Cover, shapeSmallCircle, shapeNone ), colorWhite, 0, CoverPrice, 0 ); trendup = IIf( C > ( ( DayC ) + ( ( .25 ) * ( ADM ) ) ), colorBlue, colorWhite ); trendcolor = IIf( C < ( ( DayC ) - ( ( .25 ) * ( ADM ) ) ), colorRed, trendup ); Plot( C, "Close", trendcolor, styleCandle | styleThick ); Plot( iBuyStop, "Buy Stop", colorBlue, styleDots | styleLine | styleNoRescale | styleNoTitle ); Plot( iBuyTarget1, "Buy Target1", colorGreen, styleDots |styleLine | styleNoRescale | styleNoTitle ); Plot( iBuyTarget2, "Buy Target2", colorGreen, styleDots |styleLine | styleNoRescale | styleNoTitle ); Plot( iBuyTarget3, "Buy Target3", colorGreen, styleDots |styleLine | styleNoRescale | styleNoTitle ); Plot( iShortStop, "Short Stop", colorRed, styleDots | styleLine | styleNoRescale | styleNoTitle ); Plot( iShortTarget1, "Short Target1", colorOrange, styleDots |styleLine | styleNoRescale | styleNoTitle ); Plot( iShortTarget2, "Short Target2", colorOrange, styleDots |styleLine | styleNoRescale | styleNoTitle ); Plot( iShortTarget3, "Short Target3", colorOrange, styleDots |styleLine | styleNoRescale | styleNoTitle ); _SECTION_END(); Bdc=( WriteIf (Buy==1, " BUY@ "+C+" ","") ); Sdc=( WriteIf (Short ==1 , " SEll@ "+C+" ","") ); Ndc=( WriteIf(Long ==1 AND NOT Buy, "Long@"+WriteVal((Buy))+" /Profit="+WriteVal((C-Buy))+"","")+ WriteIf(Shrt==1 AND NOT Short, "Short@"+WriteVal((Short))+" /Profit="+WriteVal((Short-C))+"","") ); if (EndValue(Buy)==1) Say("Buy Trigged, Mr. Krishna, Buy some lots"); if (EndValue(Sell)==1) Say("Sell Trigged, Mr. Krishna, Sell some lots"); _SECTION_BEGIN("Background text"); C11=ParamColor("up panel",colorBlack ); C12=ParamColor("dn panel",colorBlack ); C13=Param("fonts",20,10,30,1 ); C14=Param("left-right",2.1,1.0,5.0,0.1 ); C15=Param("up-down",8,1,30,1 ); Miny = Status("axisminy"); Maxy = Status("axismaxy"); lvb = Status("lastvisiblebar"); fvb = Status("firstvisiblebar"); pxwidth = Status("pxwidth"); pxheight = Status("pxheight"); GfxSetBkMode( 0 ); GfxSelectFont("Tahoma", 15, 600, False, False, 0); GfxSetTextColor(colorWhite); GfxSetTextAlign( 6 ); GfxTextOut( "LTP "+WriteVal(C,1.2), Status("pxwidth")/C14, Status("pxheight")/C15*1.5); GfxSelectFont("Tahoma", 12, 400, False, False, 0); GfxSetTextColor(colorBrightGreen); GfxTextOut(""+Bdc+"", Status("pxwidth")/C14, Status("pxheight")/C15*2.0); GfxSelectFont("Tahoma", 12, 400, False, False, 0); GfxSetTextColor(colorRed); GfxTextOut(""+Sdc+"", Status("pxwidth")/C14, Status("pxheight")/C15*2.0); GfxSelectFont("Tahoma", 12, 400, False, False, 0); GfxSetTextColor(colorYellow); GfxTextOut(""+Ndc+"", Status("pxwidth")/C14, Status("pxheight")/C15*2.0); GfxSelectFont("Tahoma", 12, 400, False, False, 0); GfxSetTextColor(colorGreen); x=Param("xposn",1,0,1000,1); y=Param("yposn",1,0,1000,1); GfxGradientRect( 1, 1, 1400, 25, colorGrey50, colorDarkGrey); GfxSetBkMode(0); GfxSelectFont( "Georgia", 15, 800, False ); GfxSetTextColor( colorWhite ); GfxTextOut( "ULTIMATE VOLATILITY EXPERT V3", x+600, y+2 ); GfxSelectFont( "Tahoma", 12, 800, False ); GfxSetTextColor( colorGold ); GfxTextOut( Name(), x+100, y+2 ); GfxSelectFont( "Century Gothic", 12, 100, False ); GfxSetTextColor( colorWhite ); GfxTextOut( Date(), x+1000, y+2 ); GfxSelectFont( "Comic Sans MS", 12, 500, False ); GfxSetTextColor( colorYellow ); GfxTextOut( Interval(2), x+275, y+2 ); //------------------------------------------------------------ H, L, O, C---------------------- GfxGradientRect( 1, 25, 1400, 40, colorGrey50, colorDarkGrey ); GfxSetBkMode(0); GfxSelectFont( "Areal", 9, 200, False ); GfxSetTextColor( colorWhite ); GfxTextOut( "High:"+WriteVal(H,1.2), x+100, y+26 ); GfxSelectFont( "Areal", 9, 200, False ); GfxSetTextColor( colorWhite ); GfxTextOut( "Low:"+WriteVal(L,1.2), x+200, y+26 ); GfxSelectFont( "Areal", 9, 200, False ); GfxSetTextColor( colorWhite ); GfxTextOut( "Open:"+WriteVal(O,1.2), x+300, y+26 ); GfxSelectFont( "Areal", 9, 200, False ); GfxSetTextColor( colorWhite ); GfxTextOut( "Close:"+WriteVal(C,1.2), x+400, y+26 ); GfxSelectFont( "Script MT Bold", 12, 100, False ); GfxSetTextColor( colorWhite ); GfxTextOut( "Created By Murali Krishna ", x+1000, y+26 ); GfxSelectFont( "Script MT Bold", 12, 100, False ); GfxSetTextColor( colorWhite ); GfxTextOut( "Edited By Edward Potasch ", x+600, y+26 ); //----------------------------------------------------------------Leveles---------------------------- // Dynamic Levels//----------Majer Support Resistent Zones--------------------------------------------------- DayH = TimeFrameGetPrice("H", inDaily, -1); DayHI = LastValue (DayH,1); // yesterdays high DayL = TimeFrameGetPrice("L", inDaily, -1); DayLI = LastValue (DayL,1); // yesterdays low DayC = TimeFrameGetPrice("C", inDaily, -1); DayCI = LastValue (DayC,1); // yesterdays close DayO = TimeFrameGetPrice("O", inDaily); DayOI = LastValue (DayO,1); // current day open WeekH= TimeFrameGetPrice("H", inWeekly, 0); WeekHI = LastValue (WeekH,1); // This Week high WeekL= TimeFrameGetPrice("L", inWeekly, 0); WeekLI = LastValue (WeekL,1); // This Week low MonthH= TimeFrameGetPrice("H", inMonthly, 0); MonthHI = LastValue (MonthH,1); // This Month high MonthL= TimeFrameGetPrice("L", inMonthly, 0); MonthLI = LastValue (MonthL,1); // This Month low LWeekH= TimeFrameGetPrice("H", inWeekly, -1); LWeekHI = LastValue (LWeekH,1); // One Week before high LWeekL= TimeFrameGetPrice("L", inWeekly, -1); LWeekLI = LastValue (LWeekL,1); // One Week before low LMonthH= TimeFrameGetPrice("H", inMonthly, -1); LMonthHI = LastValue (LMonthH,1); // One Month before high LMonthL= TimeFrameGetPrice("L", inMonthly, -1); LMonthLI = LastValue (LMonthL,1); // One Month before low L1WeekH= TimeFrameGetPrice("H", inWeekly, -2); L1WeekHI = LastValue (L1WeekH,1); // Two Week before high L1WeekL= TimeFrameGetPrice("L", inWeekly, -2); L1WeekLI = LastValue (L1WeekL,1); // Two Week before low L1MonthH= TimeFrameGetPrice("H", inMonthly, -2); L1MonthHI = LastValue (L1MonthH,1); // Two Month before high L1MonthL= TimeFrameGetPrice("L", inMonthly, -2); L1MonthLI = LastValue (L1MonthL,1); // Two Month before low L2WeekH= TimeFrameGetPrice("H", inWeekly, -3); L2WeekHI = LastValue (L2WeekH,1); // Three Week before high L2WeekL= TimeFrameGetPrice("L", inWeekly, -3); L2WeekLI = LastValue (L2WeekL,1); // Three Week before low L2MonthH= TimeFrameGetPrice("H", inMonthly, -3); L2MonthHI = LastValue (L2MonthH,1); // Three Month before high L2MonthL= TimeFrameGetPrice("L", inMonthly, -3); L2MonthLI = LastValue (L2MonthL,1); // Three Month before low L3MonthH= TimeFrameGetPrice("H", inMonthly, -4); L3MonthHI = LastValue (L3MonthH,1); // Four Month before high L3MonthL= TimeFrameGetPrice("L", inMonthly, -4); L3MonthLI = LastValue (L3MonthL,1); // Four Month before low L4MonthH= TimeFrameGetPrice("H", inMonthly, -5); L4MonthHI = LastValue (L4MonthH,1); // Five Month before high L4MonthL= TimeFrameGetPrice("L", inMonthly, -5); L4MonthLI = LastValue (L4MonthL,1); // Five Month before low L3WeekH= TimeFrameGetPrice("H", inWeekly, -4); L3WeekHI = LastValue (L3WeekH,1); // Four Week before high L3WeekL= TimeFrameGetPrice("L", inWeekly, -4); L3WeekLI = LastValue (L3WeekL,1); // Four Week before low //---------------------------------------------------------------------------------------------------------------------- GfxGradientRect( 1, 185, 90, 200, colorGrey50,colorDarkGrey ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorOrange ); GfxTextOut( "Levels ", x+45, y+185 ); GfxGradientRect( 1, 200, 90, 215, colorDarkGrey,colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (L4MonthH>C, " 5MH "+WriteVal(L4MonthH,1.2)+" ",""), x+50, y+200 ); GfxGradientRect( 1, 215, 90, 230, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (L3MonthH>C, " 4MH "+WriteVal(L3MonthH,1.2)+" ",""), x+50, y+215 ); GfxGradientRect( 1, 230, 90, 245, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (L2MonthH>C, " 3MH "+WriteVal(L2MonthH,1.2)+" ",""), x+50, y+230 ); GfxGradientRect( 1, 245, 90, 260, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (L1MonthH>C, " 2MH "+WriteVal(L1MonthH,1.2)+" ",""), x+50, y+245 ); GfxGradientRect( 1, 260, 90, 275, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (LMonthH>C, " LMH "+WriteVal(LMonthH,1.2)+" ",""), x+50, y+260 ); GfxGradientRect( 1, 275, 90, 290, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (MonthH>C, " CMH "+WriteVal(MonthH,1.2)+" ",""), x+50, y+275 ); GfxGradientRect( 1, 290, 90, 305, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (L3WeekH>C, " 4WH "+WriteVal(L3WeekH,1.2)+" ",""),x+50, y+290 ); GfxGradientRect( 1, 305, 90, 320, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (L2WeekH>C, " 3WH "+WriteVal(L2WeekH,1.2)+" ",""), x+50, y+305 ); GfxGradientRect( 1, 320, 90, 335, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (L1WeekH>C, " 2WH "+WriteVal(L1WeekH,1.2)+" ",""), x+50, y+320 ); GfxGradientRect( 1, 335, 90, 350, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (LWeekH>C, " 1WH "+WriteVal(LWeekH,1.2)+" ","") , x+50, y+335 ); GfxGradientRect( 1, 350, 90, 365, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (WeekH>C, " CWH "+WriteVal(WeekH,1.2)+" ",""), x+50, y+350 ); GfxGradientRect( 1, 365, 90, 380, colorDarkGrey, colorDarkRed ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (DayH>C, " PDH "+WriteVal(DayH,1.2)+" ",""), x+50, y+365 ); GfxGradientRect( 1, 380, 90, 395, colorLightBlue , colorBlue ); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorCustom12); GfxTextOut( WriteIf (C, " LTP "+WriteVal(C,1.2)+" ",""), x+50, y+380 ); GfxGradientRect( 1, 395, 90, 410, colorDarkGrey,colorDarkGreen); GfxSetBkMode(0); GfxSelectFont( "Tahoma", 10, 300, False ); GfxSetTextColor( colorWhite ); GfxTextOut( WriteIf (DayL