// Downloaded From https://www.WiseStockTrader.com TimeFrameSet(inDaily); DayHigh = LastValue(H); DayLow = LastValue(L); TimeFrameRestore(); Title = Date() + ", Op=" + Open + ", Hi=" + High + ", Lo=" + Low + ", LTP=" + Close + ", Change= " + SelectedValue( ROC( C, 1 ) ) + "%" + "\n Today`s High=" + DayHigh + ", Today`s Low=" + DayLow + " © PRIME SYSTEM" ; prev=AMA2(C,1,0); d=IIf(C>Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(CRef(state,-1); ss=stateRef(res,-1),1,IIf(CMDI(10)AND Signal(29)PDI(20)AND Signal(29)>MACD(13); Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon", IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */ styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); _SECTION_END(); Buy = s AND a AND uptrend ; Short = ss AND b AND downtrend ; Sell = ss AND b AND downtrend ; Cover = s AND a AND uptrend ; Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); Cover=ExRem(Cover,Short); Short=ExRem(Short,Cover); Filter=Buy OR Sell; Filter= Cover OR Short; AddColumn( Buy, "Buy", 1); AddColumn(Sell, "Sell", 1); AddColumn(Close,"Close",1.2); AddColumn(Volume,"Volume",1.0); // Plot the Buy and Sell arrows. shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-10); PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-20); PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-15); PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=20); PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=30); PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-25); //plot volume graph // set background gradient colours SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )),ParamColor("BgBottom", ColorRGB( 102,136,187 )),ParamColor("titleblock",ColorRGB( 255,255,255 ))); GraphXSpace = 5; _SECTION_BEGIN("Magnified Market Price"); FS=Param("Font Size",28,11,100,1); GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True ); GfxSetBkMode( colorWhite ); GfxSetTextColor( ParamColor("Color",colorViolet) ); Hor=Param("Horizontal Position",766,4,1200,4); Ver=Param("Vertical Position",4,4,4,4); 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("Arial", 12, 700, italic = False, underline = False, True ); GfxSetBkMode( colorWhite ); GfxSetTextColor(ParamColor("Color",colorYellow) ); GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 ); _SECTION_END(); _SECTION_BEGIN("Price"); upbar = C > Ref( C, -1 ); downbar = C < Ref( C, -1 ); /* Colourized price bars drawn here */ Graph0 = Close; Graph0Style = 128; barcolor = IIf( downbar, 4, IIf( upbar, 5, 1 ) ); Graph0BarColor = ValueWhen( barcolor != 0, barcolor ); SetBarFillColor( IIf( Close > Open, colorGreen, colorDarkRed ) ); SetChartOptions(0,chartShowArrows|chartShowDates); GfxSelectFont( "Tahoma", 13, 100 ); GfxSetBkMode( 1 ); GfxSetTextColor( colorWhite ); //_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Title = EncodeColor(colorWhite)+ Name() + " - " + EncodeColor(colorYellow)+ Interval(2) + EncodeColor(colorYellow) + " - " + Date() +" - "+ EncodeColor(colorYellow) + "Open = "+EncodeColor(colorWhite)+WriteVal(O,8.2) + EncodeColor(colorYellow) + ", High = "+EncodeColor(colorWhite)+ WriteVal(H,8.2)+ EncodeColor(colorYellow) + ", Low= "+EncodeColor(colorWhite)+ WriteVal(L,8.2)+ EncodeColor(colorYellow) + ", Close= "+EncodeColor(colorWhite)+ WriteVal(C,8.2)+ EncodeColor(colorYellow) + ", Vol= "+EncodeColor(colorWhite)+ WriteVal(V,1)+("\n"); Plot( C, "Close", ParamColor("Color", colorYellow ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); Plot( O, "Open", ParamColor("Color", colorBlack ), styleNoDraw); Plot( H, "High", ParamColor("Color", colorBlack ), styleNoDraw); Plot( L, "Low", ParamColor("Color", colorBlack ),styleNoDraw); Plot( C, "Close", ParamColor("Color", colorBlack ),styleNoDraw, ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); //Comments: ////////////////////////////////////////// DAY GRID /////////////////////////////////////////////////////////////////////////////// //----------------------------------------------------------------------------------------------------------------------------------- grid_day = IIf(Day()!=Ref(Day(),-1),1,0); Plot(grid_day,"",colorWhite,styleHistogram|styleDashed|styleNoLabel|styleOwnScale); /////////////////////////////////////////////////////////////////////////////// _SECTION_BEGIN("swing1"); messageboard = ParamToggle("Message Board","Show|Hide",0); showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0); no=20; res=HHV(H,no); sup=LLV(L,no); avd=IIf(C>Ref(res,-1),1,IIf(C( Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1) ),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(C( Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1) ),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(C1;i--) { if(Buy[i] == 1) { entry = C[i]; sig = "BUY"; sl = supres[i]; tar1 = entry + (entry * .0050); tar2 = entry + (entry * .0092); tar3 = entry + (entry * .0125); tar4 = entry + (entry * .0192); bars = i; i = 0; } if(Sell[i] == 1) { sig = "SELL"; entry = C[i]; sl = supres[i]; tar1 = entry - (entry * .0050); tar2 = entry - (entry * .0112); tar3 = entry - (entry * .0152); tar4 = entry - (entry * .0212); /*tar1 = entry - 22; tar2 = entry - 38; tar3 = entry - 55;*/ bars = i; i = 0; } } Offset = 3; Clr = IIf(sig == "BUY", colorLime, colorRed); ssl = IIf(bars == BarCount-1, supres[BarCount-1], Ref(supres, -1)); sl = ssl[BarCount-1]; Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, tar4, BarCount, tar4,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset); Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset); for (i=bars; i Ref(state,-1); ss=stateRef(res,-1),1,IIf(C( Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1) ),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(C( Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1) ),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(C1;i--) { if(Buy[i] == 1) { entry = C[i]; sig = "BUY"; sl = supres[i]; tar1 = entry + (entry * .0050); tar2 = entry + (entry * .0092); tar3 = entry + (entry * .0125); tar4 = entry + (entry * .0192); bars = i; i = 0; } if(Sell[i] == 1) { sig = "SELL"; entry = C[i]; sl = supres[i]; tar1 = entry - (entry * .0050); tar2 = entry - (entry * .0112); tar3 = entry - (entry * .0152); tar4 = entry - (entry * .0212); /*tar1 = entry - 22; tar2 = entry - 38; tar3 = entry - 55;*/ bars = i; i = 0; } } Offset = 3; Clr = IIf(sig == "BUY", colorLime, colorRed); ssl = IIf(bars == BarCount-1, supres[BarCount-1], Ref(supres, -1)); sl = ssl[BarCount-1]; Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, tar4, BarCount, tar4,1), "", Clr, styleLine|styleDots, Null, Null, Offset); Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset); Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset); for (i=bars; i Ref(state,-1); ss=state