// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("Price"); 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("Universal VSA 2"); // Volume Calculations // av=MA(V,30); //avg vol uhv=IIf(V>2*av,1,Null); //very high vol hV=IIf(V>1.1*av AND V<2*av,1,Null); //high volume Lv=IIf(V>0.5*aV AND V<0.9*av,1,Null); //low volume ulv=IIf(V<0.5*av,1,Null); //ultra low vol // Range Calculations // r=H-L; //daily range Hb=(H+L)/2; //Half Back ar=EMA(r,30); //avg range uwrb=IIf(r>2*ar,1,Null); // ultra wide range bar wrb=IIf(r>1.33*ar AND r<2*ar,1,Null); //wide range bar nrb=IIf(r>0.67*ar AND r<1.33*ar,1,Null); //nrmal range bar srb=IIf(r<0.67*ar,1,Null); //small range bar usrb=IIf(r<0.5*ar,1,Null); // ultra small range bar PlotOHLC(Null,H,L,C,"Price",IIf(C>Ref(C,-1),colorBlue,IIf(C==Ref(C,-1),colorBlack,colorRed)),styleBar+styleThick); // Diamond Trending System wm=WMA(C,40); Plot(wm,"WMA",IIf(wm>Ref(wm,-1),colorSkyblue,colorLightOrange),styleDots+styleThick+styleNoLine); // Close Position // u3=IIf(C>(H-r/3),1,Null); // Upper 3rd m3=IIf(C<(H-r/3) AND C>(L+r/3),1,Null); // Middle 3rd L3=IIf(C<(L+r/3),1,Null); // Lower 3rd // Trend // h5d=IIf(H>Ref(HHV(H,5),-1),1,Null); // 5 day high h20d=IIf(H>Ref(HHV(H,20),-1),1,Null); // 20 day high h50d=IIf(H>Ref(HHV(H,50),-1),1,Null); // 50 day high h100d=IIf(H>Ref(HHV(H,100),-1),1,Null); // 100 day high l5d=IIf(LRef(HHV(V,3),-1) AND l20d) OR uhv) AND (uwrb OR wrb) AND (m3 OR u3); //Selling Climax sos2=Car) AND u3 AND l5d; //No Supply sos6=CRef(HHV(V,5),-1)) AND L5d)) AND Ref(C,1)>C; //Trap Dn Move sos8=LRef(H,-1) AND (hv OR uhv OR V>Ref(HHV(V,5),-1)); //SOS Plotting// //Stopping Volume PlotShapes(IIf(sos1,shapeSmallUpTriangle,Null),IIf(Ref(C,1)>C,colorGreen,colorPaleGreen),0,Low); //Selling Climax PlotShapes(IIf(sos2,shapeSmallUpTriangle,Null),IIf(Ref(C,1)>C,colorGreen,colorPaleGreen),0,Low); //Demand Overcoming Supply PlotShapes(IIf(sos3,shapeSmallUpTriangle,Null),IIf(Ref(C,1)>C,colorGreen,colorPaleGreen),0,Low); //Bag Holding PlotShapes(IIf(sos4,shapeSmallUpTriangle,Null),IIf(Ref(C,1)>C,colorGreen,colorPaleGreen),0,Low); //Shake Out PlotShapes(IIf(sos5,shapeUpArrow,Null),IIf(Ref(C,1)>C,colorGreen,colorPaleGreen),0,Low); //No Supply PlotShapes(IIf(sos6,shapeSmallCircle,Null),IIf(Ref(C,1)>C,colorGreen,colorPaleGreen),0,Low); //Professional Buying PlotShapes(IIf(sos7,shapeUpArrow,Null),IIf(Ref(C,1)>C,colorGreen,colorPaleGreen),0,Low); //Trap Dn Move PlotShapes(IIf(sos8,shapeSmallUpTriangle,Null),IIf(Ref(C,1)>C,colorGreen,colorPaleGreen),0,Low); //SOW// //Supply Coming In sow1=C>Ref(C,-1) AND ((V>Ref(HHV(V,3),-1) AND h20d) OR uhv) AND (uwrb OR wrb) AND (m3 OR l3); //Buying Climax sow2=C>Ref(C,-1) AND ((hv AND h20d) OR uhv) AND (uwrb OR wrb) AND (l3 OR m3); //Supply Overcoming Demand sow3=C>Ref(C,-1) AND (m3 OR l3) AND (nrb OR srb) AND (h20d OR uhv); //End Of Rising Market sow4=C>Ref(C,-1) AND uhv AND (nrb OR srb OR usrb) AND h100d; //Upthrust sow5=(uwrb OR wrb OR r>ar) AND l3 AND h5d; //No Demand sow6=C>Ref(C,-1) AND ((rRef(C,-1) AND u3 AND (uhv OR ((hv OR V>Ref(HHV(V,5),-1)) AND H5d)) AND Ref(C,1)Ref(H,-1) AND CRef(HHV(V,5),-1)); //SOW Plotting// //Supply Coming In PlotShapes(IIf(sow1,shapeSmallDownTriangle,Null),IIf(Ref(C,1)= mystartbar, InitialValue, Null) ; Temp1 = IIf(BarIndex() >= mystartbar, InitialValue1, Null) ; Temp2 = IIf(BarIndex() >= mystartbar, InitialValue2, Null) ; Temp3 = IIf(BarIndex() >= mystartbar, InitialValue3, Null) ; Temp4 = IIf(BarIndex() >= mystartbar, InitialValue4, Null) ; Temp5 = IIf(BarIndex() >= mystartbar, InitialValue5, Null) ; Temp6 = IIf(BarIndex() >= mystartbar, InitialValue6, Null) ; Temp7 = IIf(BarIndex() >= mystartbar, InitialValue7, Null) ; Plot(Temp, "H", colorGreen,styleThick); Plot(Temp1, "L", colorRed,styleThick); /*Plot(Temp2, "", colorBrown,styleDashed); Plot(Temp3, "", colorBrown,styleDashed); Plot(Temp4, "", colorBrown,styleDashed); Plot(Temp5, "", colorBrown,styleDashed); Plot(Temp6, "", colorBlue,styleDashed); Plot(Temp7, "", colorBlue,styleDashed);*/ _SECTION_END(); _SECTION_BEGIN("VAP"); segments = IIf( Interval() < inDaily, Day(), Month() ); segments = segments != Ref( segments , -1 ); PlotVAPOverlayA( segments , Param("Lines", 300, 100, 1000, 1 ), Param("Width", 80, 1, 100, 1 ), ParamColor("Color", colorGold ), ParamToggle("Side", "Left|Right" ) | 2 * ParamToggle("Style", "Fill|Lines", 0) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) ); Plot(segments, "", colorLightGrey, styleHistogram | styleOwnScale ); _SECTION_END(); _SECTION_BEGIN("VWAP"); /* The VWAP for a stock is calculated by adding the dollars traded for every transaction in that stock ("price" x "number of shares traded") and dividing the total shares traded. A VWAP is computed from the Open of the market to the market Close, AND is calculated by Volume weighting all transactions during this time period */ Bars_so_far_today = 1 + BarsSince( Day() != Ref(Day(), -1)); bars_this_month = 1 + BarsSince( Month() != Ref(Month(), -1)); StartBar = ValueWhen(TimeNum() == 093000, BarIndex()); TodayVolume = Sum(V,Bars_so_far_today); MonthVolume = Sum(V,bars_this_month); VWAP_M = Sum (C * V, bars_this_month ) / MonthVolume; IIf (BarIndex() >= StartBar, VWAP = Sum (C * V, Bars_so_far_today ) / TodayVolume,0); Plot (VWAP,"VWAP",colorBrown, styleThick,Null,Null,Null,1); //Plot (VWAP_M,"VWAP_M",colorGreen, styleLine,Null,Null,Null,1); _SECTION_END(); _SECTION_BEGIN("Close Daily"); Plot(TimeFrameGetPrice("O",inDaily),"",colorGreen,styleThick,Null,Null,0,1); Plot((TimeFrameGetPrice("H",inDaily)+TimeFrameGetPrice("L",inDaily))*0.5,"",colorGold,styleThick,Null,Null,0,1); Plot(TimeFrameGetPrice("C",inDaily),"",colorRed,styleThick,Null,Null,0,1); //Plot(Ref(LastValue(TimeFrameGetPrice("C",inDaily)),-50),"",colorIndigo,styleThick,Null,Null,50,1); //Plot(Ref(LastValue(TimeFrameGetPrice("L",inDaily)),-50),"",colorIndigo,styleThick,Null,Null,50,1); Plot(Ref(LastValue(TimeFrameGetPrice("C",inDaily)),-50),"",colorRed,styleThick+styleDashed,Null,Null,50,1); //PlotShapes(IIf(Day()!=Ref(Day(),-1),shapeSmallSquare,Null),colorGreen,0,TimeFrameGetPrice("O",inDaily),0); //PlotShapes(IIf(Day()!=Ref(Day(),-1),shapeSmallSquare,Null),colorRed,0,TimeFrameGetPrice("C",inDaily),0); _SECTION_END(); _SECTION_BEGIN("Watermark"); GfxSetOverlayMode(1); GfxSelectFont("Tahoma", Status("pxheight")/20 ); GfxSetTextAlign( 6 );// center alignment GfxSetTextColor( ColorRGB( 200, 200, 200 ) ); GfxSetBkMode(1); // transparent GfxTextOut( "#DeanMarketProfile", Status("pxwidth")/1.25, Status("pxheight")/16); GfxTextOut( "getthattradingedge.in", Status("pxwidth")/1.25, Status("pxheight")/8); _SECTION_END();