Sunteți pe pagina 1din 9

_SECTION_BEGIN("Price"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Cl ose %g (%.

1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedVa lue( ROC( C, 1 )) )); SMA = MA(34,500); trendup = IIf(CCI(50) > 50 AND RSI(14) > 50, colorBlue, colorDarkGreen); trendcolor = IIf( CCI(50) < 50 AND RSI(14) < 50, colorRed, trendup); Plot( C, "Close", trendcolor, styleCandle | styleThick ); if( ParamToggle("Tooltip shows", "All Values | Only Prices" ) ) { ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+Nu mToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 ))); } _SECTION_END(); SetChartBkColor(ParamColor("Panel color ",colorBlack)); PlotOHLC( Open, High, Low, Close, "", colorWhite, styleCandle| styleThick ); _SECTION_BEGIN("Price"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Cl ose %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("TREND"); SetBarsRequired(100000,0); GraphXSpace = 15; ea = TEMA(C,7); eb = TEMA(C,16); SetBarFillColor( IIf( ea > eb, colorGreen, colorRed ) ); Plot( C, "Price", IIf( ea > eb, colorGreen, colorRed ), styleCandle ); Buy = ea > eb AND TimeNum() > 085000 AND TimeNum() < 125000; Sell = eb > ea OR TimeNum() > 125000; Short = 0; Cover = 0; Buy = ExRem(Buy,Sell); Sell = ExRem(Sell,Buy); Short = ExRem(Short,Cover); Cover = ExRem(Cover,Short); SetTradeDelays(0,0,0,0); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Cl ose %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Factor=Param("Factor",4,1,10,1); Pd=Param("ATR Periods",15,1,1000,1); Up=(H+L)/2+(Factor*ATR(Pd)); Dn=(H+L)/2-(Factor*ATR(Pd)); iATR=ATR(Pd); TrendUp=TrendDown=Null; trend[0]=1; changeOfTrend=0; flag=flagh=0; for (i = 1; i <BarCount; i++) { TrendUp[i] = Null; TrendDown[i] = Null; trend[i]=1; if (Close[i]>Up[i-1]) { trend[i]=1; if (trend[i-1] == -1) changeOfTrend = 1; }

else if (Close[i]<Dn[i-1]) { trend[i]=-1; if (trend[i-1] == 1) changeOfTrend = 1; } else if (trend[i-1]==1) { trend[i]=1; changeOfTrend = 0; } else if (trend[i-1]==-1) { trend[i]=-1; changeOfTrend = 0; } if (trend[i]<0 && trend[i-1]>0) { flag=1; } else { flag=0; } if (trend[i]>0 && trend[i-1]<0) { flagh=1; } else { flagh=0; } if (trend[i]>0 && Dn[i]<Dn[i-1]){ Dn[i]=Dn[i-1]; } if (trend[i]<0 && Up[i]>Up[i-1]) { Up[i]=Up[i-1]; } if (flag==1) { Up[i]=(H[i]+L[i])/2+(Factor*iATR[i]);; } if (flagh==1) { Dn[i]=(H[i]+L[i])/2-(Factor*iATR[i]);; } if (trend[i]==1) { TrendUp[i]=Dn[i]; if (changeOfTrend == 1) { TrendUp[i-1] = TrendDown[i-1]; changeOfTrend = 0; } } else if (trend[i]==-1) { TrendDown[i]=Up[i]; if (changeOfTrend == 1) { TrendDown[i-1] = TrendUp[i-1]; changeOfTrend = 0; } } } Plot(TrendUp,"Trend",colorGreen); Plot(TrendDown,"Down",colorRed); Buy = trend==1; Sell=trend==-1; Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); Short=Sell; Cover=Buy; BuyPrice=ValueWhen(Buy,C);

SellPrice=ValueWhen(Sell,C); ShortPrice=ValueWhen(Short,C); CoverPrice=ValueWhen(Cover,C); Title = EncodeColor(colorWhite)+ "win" + " - " + Name() + " - " + EncodeColor(co lorRed)+ Interval(2) + EncodeColor(colorWhite) + " - " + Date() +" - "+"\n" +EncodeColor(colorRed) +"Op-"+O+" "+"Hi-"+H+" "+"Lo-" +L+" "+ "Cl-"+C+" "+ "Vol= "+ WriteVal(V)+"\n"+ EncodeColor(colorLime)+ WriteIf (Buy , " GO LONG / Reverse Signal at "+C+" ","")+ WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+" ","")+"\n"+EncodeColor(col orYellow)+ WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+ WriteIf(Buy , "Total Profit/Loss for the Last trade Rs."+(SellPrice-C)+"",""); PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40); PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorBlue, 0,L, Offset=-50); PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorBlack, 0,L, Offset=-45); PlotShapes(IIf(Short, shapeSquare, shapeNone),colorRed, 0, H, Offset=40); PlotShapes(IIf(Short, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50); PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorPink, 0,H, Offset=-45); TrendSL=IIf(trend==1,TrendUp,TrendDown); for(i=BarCount-1;i>1;i--) { if(Buy[i] == 1) { entry = C[i]; sig = "BUY"; sl = TrendSL[i]; tar1 = entry + (entry * .0050); tar2 = entry + (entry * .0092); tar3 = entry + (entry * .0179); bars = i; i = 0; } if(Sell[i] == 1) { sig = "SELL"; entry = C[i]; sl = TrendSL[i]; tar1 = entry - (entry * .0050); tar2 = entry - (entry * .0112); tar3 = entry - (entry * .0212); bars = i; i = 0; } } Offset = -20; Clr = IIf(sig == "BUY", colorLime, colorRed); ssl = IIf(bars == BarCount-1, TrendSL[BarCount-1], Ref(TrendSL, -1)); sl = ssl[BarCount-1]; Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleLin e, Null, Null, Offset); //Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleD ots, Null, Null, Offset); //Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleD ots, Null, Null, Offset); //Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|s tyleLine, Null, Null, Offset); //Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLi ne|styleLine, Null, Null, Offset);

for (i=bars; i <BarCount;i++) { PlotText(""+sig+"@"+entry, BarCount+1,entry,Null,colorBlue); PlotText("T1@"+tar1,BarCount+3,tar1,Null,Clr); //PlotText("T2@"+tar2,BarCount+3,tar2,Null,Clr);Plot Text ("T3@"+tar3,BarCount+3 ,tar3,Null,Clr); } messageboard = ParamToggle("Message Board","Show|Hide",1); if (messageboard == 1 ) { GfxSelectFont( "Book Antiqua bold", 10, 100 ); GfxSetBkMode( 1 ); GfxSetTextColor( colorWhite ); if ( sig =="BUY") { GfxSelectSolidBrush( colorBlue ); // this is the box background color } else { GfxSelectSolidBrush( colorRed ); // this is the box background color } pxHeight = Status( "pxchartheight" ) ; xx = Status( "pxchartwidth"); Left = 1100; width = 310; x = 5; x2 = 290; y = pxHeight; GfxSelectPen( colorGreen, 1); // broader color GfxRoundRect( x, y - 98, x2, y , 7, 7 ) ; GfxTextOut( ( "TREND"),13,y-100); GfxTextOut( (" "),27,y-100); GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 13, y-80) ; // The text format location GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 13, y-60); GfxTextOut( ("Trailing SL : " + TrendSL + " (" + WriteVal(IIf(sig == "SELL",entr y-sl,sl-entry), 2.2) + ")"), 13, y-40); /*GfxTextOut( ("TGT:1 : " + tar1), 13, y -80); GfxTextOut( ("TGT:2 : " + tar2), 13,y-60); GfxTextOut( ("TGT:3 : " + tar3), 13,y-40);*/ GfxTextOut( ("Current P/L : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2 .2)), 13, y-22);; } GP_tlineUp1[0] = 0; // Parameters required by plugin DLL GP_tlineUp2[0] = 0; GP_tlineDown1[0] = 0; GP_tlineDown2[0] = 0; GP_closeAbove[0] = 0; GP_aboveIx = -1; GP_yover = -1; GP_recentPeak = -1; GP_changeAtr[0] = 0; tchg = Param("1. Peak/Trough Change? (%)", 20, 1, 200, 1); closeOver = Param("2. Close Above? (%)", 3, 0, 50, 1); lineCnt = Param("3. Line Count?", 2, 0, 100, 1); endEma = Param("4. Test EMA Period?", 30, 2, 100, 1); oshoot = Param("5. Draw Overshoot?", 0, 0, 50, 1); Plot(Close, "Price", -1, styleCandle); // Plot main price array Bottom = IIf(Close < Open, Close, Open); // Bottom of open/close array

Top = IIf(Close > Open, Close, Open); // Top of open/close array bi = BarIndex(); startIx = BeginValue(bi) - bi[0]; endIx = EndValue(bi) - bi[0]; if (endIx < startIx) endIx = startIx; GP_changeAtr = 1+5*(ATR(3)/Close); eend = EMA(Close, endEma*GP_changeAtr[endIx]); // EMA period for end direction lrs = LinRegSlope(eend, 2); isUp = lrs[endIx] >= 0; // Slope of EMA on last day fit = GP_DrawTrendLines(Bottom, Top, lineCnt, endIx, startIx, tchg, oshoot, clos eOver, 0, isUp, Prefs(24)); for (i = 0; i < startIx; i++) { GP_tlineUp1[i] = -1e10; GP_tlineUp2[i] = -1e10; GP_tlineDown1[i] = -1e10; GP_tlineDown2[i] = -1e10; GP_closeAbove[i] = 0; } for (i = endIx+1; i < BarCount; i++) { GP_tlineUp1[i] = -1e10; GP_tlineUp2[i] = -1e10; GP_tlineDown1[i] = -1e10; GP_tlineDown2[i] = -1e10; GP_closeAbove[i] = 0; } Plot(GP_tlineUp1, "", colorDarkBlue, styleLine|styleThick); Plot(GP_tlineUp2, "", colorDarkBlue, styleLine|styleThick); Plot(GP_tlineDown1, "", colorDarkRed, styleLine|styleThick); Plot(GP_tlineDown2, "", colorDarkRed, styleLine|styleThick); _SECTION_BEGIN("INIT"); SetChartOptions(0,chartShowArrows|chartShowDates); ScanLookBack = Param("Scan Lookback", 2, 1, 25 ); fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2); _SECTION_END(); _SECTION_BEGIN("Price"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) )); Plot( C, _DEFAULT_NAME(), colorBlack , styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); _SECTION_BEGIN("Up Trend Line"); UTValue1=LastValue(Trough(L,0.5,2)); UTValue2=LastValue(Trough(L,0.5,1)); UTBar1=BarCount - 1 - LastValue(TroughBars(L,0.5 ,2)); UTBar2=BarCount - 1 - LastValue(TroughBars(L,0.5 ,1)); UpTrendLine = LineArray( UTBar1, UTValue1, UTBar2,UTValue2, 1 ); UTLine = LineArray( UTBar1, UTValue1, UTBar2,UTValue2, 0 ); Plot( UpTrendLine , _DEFAULT_NAME(), colorGreen,styleLine | styleNoTitle | styleNoLabel); Plot( UTLine , _DEFAULT_NAME(), colorGreen,styleLine | styleNoTitle | styleNoLabel); _SECTION_END(); _SECTION_BEGIN("Down Trend Line"); DTValue1=LastValue(Peak(H,0.5 ,2)); DTValue2=LastValue(Peak(H,0.5 ,1)); DTBar1=BarCount - 1 - LastValue(PeakBars(H,0.5 ,2));

DTBar2=BarCount - 1 - LastValue(PeakBars(H,0.5 ,1)); DownTrendLine = LineArray( DTBar1, DTValue1, DTBar2,DTValue2, 1 ); DTLine = LineArray( DTBar1, DTValue1, DTBar2,DTValue2, 0 ); Plot( DownTrendLine ,_DEFAULT_NAME(), colorRed,styleLine | styleNoTitle | styleNoLabel); Plot( DTLine ,_DEFAULT_NAME(), colorRed,styleLine | styleNoTitle | styleNoLabel); PlotText("PV = " + WriteVal(DTValue2 ,fraction), LastValue(BarIndex())+2, (DTValue2 ), colorRed); PlotText("TV = " + WriteVal(UTValue2,fraction), LastValue(BarIndex())+2, UTValue2, colorGreen); PlotOHLC( UpTrendLine , UpTrendLine , DownTrendLine , DownTrendLine , "", ColorBlend( colorGreen, colorLightYellow, 0.9 ), styleCloud | styleNoRescale); Plot(LineArray( DTBar2, DTValue2, BarCount,DTValue2, 0 ),"",colorRed); Plot(LineArray( UTBar2, UTValue2, BarCount,UTValue2, 0 ),"",colorGreen); _SECTION_END(); _SECTION_BEGIN("Pivot"); YH = TimeFrameGetPrice("H", inDaily, -1); // yesterdays high YL = TimeFrameGetPrice("L", inDaily, -1); // low YC = TimeFrameGetPrice("C", inDaily, -1); // close TO = TimeFrameGetPrice("O", inDaily); // current day open //Normal Pivot PP = (YH + YL + YC) / 3; R1 = (2 * PP) - YL; R2 = PP + (YH - YL); R3 = YH + 2*(PP-YL); S1 = (2 * PP) - YH; S2 = PP - (YH - YL); S3 = YL - 2*(YH - PP) ; _SECTION_END(); _SECTION_BEGIN("Title"); _SECTION_END(); _SECTION_BEGIN("Target"); CBuy = Cross(C,DownTrendLine); CSell = Cross(UpTrendLine ,C); baratbuy = ValueWhen(CBuy ,BarIndex()) ; baratsell = ValueWhen(CSell ,BarIndex()) ; _SECTION_END(); _SECTION_BEGIN("Pivot"); YH = TimeFrameGetPrice("H", inDaily, -1); // yesterdays high YL = TimeFrameGetPrice("L", inDaily, -1); // low YC = TimeFrameGetPrice("C", inDaily, -1); // close TO = TimeFrameGetPrice("O", inDaily); // current day open //Normal Pivot PP = (YH + YL + YC) / 3; R1 = (2 * PP) - YL; R2 = PP + (YH - YL); R3 = YH + 2*(PP-YL); S1 = (2 * PP) - YH; S2 = PP - (YH - YL); S3 = YL - 2*(YH - PP) ; _SECTION_END(); _SECTION_BEGIN("Title"); Title = EncodeColor(colorWhite)+ Date() + " Close = " + EncodeColor(colorRed) +Close + EncodeColor(colorWhite) + " Open = " + EncodeColor(colorRed) + O +

EncodeColor(colorWhite) + " High = " + EncodeColor(5) + H + EncodeColor(colorWhite) + " Low = " + EncodeColor(colorRed) + L + EncodeColor(colorWhite) + " Volume = " + EncodeColor(colorRed) + V + "\n\n"+ EncodeColor(colorWhite) + "Pivot Point= " + EncodeColor(colorBlue) + PP + EncodeColor(colorWhite) + " Day's Open= " + EncodeColor(colorBlue) + TO +"\n\n"+ EncodeColor(colorGreen) + "If days open is greater than Pivot Point, market is i n uptrend AND \n"+EncodeColor(colorRed)+"if days Open is less than PivotPoint, m arket is in downtrend" +"\n\n"+ EncodeColor(colorRed) + "R1= " + EncodeColor(colorBlue) + R1 + EncodeColor(colorRed) + " R2= " + EncodeColor(colorBlue) + R2 + EncodeColor(colorRed) + " R3= " + EncodeColor(colorBlue) + R3 +"\n"+ EncodeColor(colorGreen) + "S1= " + EncodeColor(colorBlue) + S1 + EncodeColor(colorGreen) + " S2= " + EncodeColor(colorBlue) + S2 + EncodeColor(colorGreen) + " S3= " + EncodeColor(colorBlue) + S3 +"\n"+ EncodeColor( colorWhite) +"____ _____ _______ _______ _______"+"\n"; _SECTION_END(); _SECTION_BEGIN("Target"); CBuy = Cross(C,DownTrendLine); CSell = Cross(UpTrendLine ,C); baratbuy = ValueWhen(CBuy ,BarIndex()) ; baratsell = ValueWhen(CSell ,BarIndex()) ; _SECTION_END(); _SECTION_BEGIN("Auto"); Buy = ( CBuy ) AND ( (BarCount - baratbuy )<=ScanLookBack ); Sell = ( CSell ) AND ( (BarCount - baratsell )<=ScanLookBack ) ; price = C[BarCount-1]; AlertIf(Buy,"","Buy @"+C+" Price @ Trigger="+price,1); AlertIf(Sell,"","Sell @"+C+" Price @ Trigger="+price,2); Filter = Buy OR Sell ; Var = WriteIf(Buy,"BUY",WriteIf(Sell,"SELL","")); AddTextColumn( Var , "Buy/Sell", 1.2 , colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(price ,"Price",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(C ,"Price @ Trigger",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); stoploss = IIf(Buy, (price * (1-0.01)) , IIf(Sell, (price * (1+0.01)),0)); target1per = IIf(Buy, (price * (1+0.01)) , IIf(Sell, (price * (1-0.01)),0)); target15per = IIf(Buy, (price * (1+0.015)) , IIf(Sell, (price * (1-0.015)),0)); target2per = IIf(Buy, (price * (1+0.02)) , IIf(Sell, (price * (1-0.02)),0)); AddColumn(stoploss ,"Stop Loss",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(target1per ,"1% Target",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(target15per ,"1.5% Target",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(target2per ,"2% Target",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(V ,"Volume",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); bardiff = BarCount - IIf(Buy,baratbuy,IIf(Sell,baratsell,0)); AddColumn(bardiff ,"Bar Diff",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); _SECTION_END(); _SECTION_BEGIN("Magnified Market Price");

FS=Param("Font Size",28,11,100,1); GfxSelectFont("Book Antiqua", FS, 700, italic = False, underline = False, True ) ; GfxSetBkMode( colorWhite ); GfxSetTextColor( ParamColor("Color",colorViolet) ); Hor=Param("Horizontal Position",766,1,1200,1); Ver=Param("Vertical Position",1,1,1,1); GfxTextOut(""+C,Hor , Ver ); GfxTextOut( Name(), Hor,Ver-50 ); YC=TimeFrameGetPrice("C",inDaily,-1); DD=Prec(C-YC,2); xx=Prec((DD/YC)*100,2); GfxSelectFont("Book Antiqua", 12, 700, italic = False, underline = False, True ) ; GfxSetBkMode( colorWhite ); GfxSetTextColor(ParamColor("Color",colorViolet) ); GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 ); _SECTION_END(); _SECTION_BEGIN("Auto"); Buy = ( CBuy ) AND ( (BarCount - baratbuy )<=ScanLookBack ); Sell = ( CSell ) AND ( (BarCount - baratsell )<=ScanLookBack ) ; price = C[BarCount-1]; AlertIf(Buy,"","Buy @"+C+" Price @ Trigger="+price,1); AlertIf(Sell,"","Sell @"+C+" Price @ Trigger="+price,2); Filter = Buy OR Sell ; Var = WriteIf(Buy,"BUY",WriteIf(Sell,"SELL","")); AddTextColumn( Var , "Buy/Sell", 1.2 , colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(price ,"Price",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(C ,"Price @ Trigger",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); stoploss = IIf(Buy, (price * (1-0.01)) , IIf(Sell, (price * (1+0.01)),0)); target1per = IIf(Buy, (price * (1+0.01)) , IIf(Sell, (price * (1-0.01)),0)); target15per = IIf(Buy, (price * (1+0.015)) , IIf(Sell, (price * (1-0.015)),0)); target2per = IIf(Buy, (price * (1+0.02)) , IIf(Sell, (price * (1-0.02)),0)); AddColumn(stoploss ,"Stop Loss",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(target1per ,"1% Target",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(target15per ,"1.5% Target",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(target2per ,"2% Target",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); AddColumn(V ,"Volume",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); bardiff = BarCount - IIf(Buy,baratbuy,IIf(Sell,baratsell,0)); AddColumn(bardiff ,"Bar Diff",1.2,colorBlack, IIf( Buy, colorLime, IIf(Sell,colorOrange,colorWhite) )); _SECTION_END(); _SECTION_BEGIN("Magnified Market Price"); FS=Param("Font Size",28,11,100,1); GfxSelectFont("Book Antiqua", FS, 700, italic = False, underline = False, True ) ; GfxSetBkMode( colorWhite );

GfxSetTextColor( ParamColor("Color",colorViolet) ); Hor=Param("Horizontal Position",766,1,1200,1); Ver=Param("Vertical Position",1,1,1,1); GfxTextOut(""+C,Hor , Ver ); GfxTextOut( Name(), Hor,Ver-50 ); YC=TimeFrameGetPrice("C",inDaily,-1); DD=Prec(C-YC,2); xx=Prec((DD/YC)*100,2); GfxSelectFont("Book Antiqua", 12, 700, italic = False, underline = False, True ) ; GfxSetBkMode( colorWhite ); GfxSetTextColor(ParamColor("Color",colorViolet) ); GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 ); _SECTION_END();