// Downloaded From https://www.WiseStockTrader.com //R2=> Heinkin Ashi Price Action //R1=> Decorative Works _SECTION_BEGIN("Chart Settings"); SetChartOptions(0,chartShowArrows|chartShowDates); SetChartBkColor(ParamColor("Outer Panel",colorPaleGreen)); SetChartBkGradientFill(ParamColor("Upper Chart",1),ParamColor("Lower Chart",23)); GraphXSpace=Param("GraphXSpace",10,0,100,1); dec = (Param("Decimals",2,0,7,1)/10)+1; bi = BarIndex(); Lbi = LastValue(BarIndex()); sbi = SelectedValue(bi); x1= BarCount-1; Title = EncodeColor(55)+ Title = Name() + " " + EncodeColor(32) + Date() + " " + EncodeColor(5) + "{{INTERVAL}} " + EncodeColor(55)+ " Open = "+ EncodeColor(52)+ WriteVal(O,dec) + EncodeColor(55)+ " High = "+ EncodeColor(5) + WriteVal(H,dec) + EncodeColor(55)+ " Low = "+ EncodeColor(32)+ WriteVal(L,dec) + EncodeColor(55)+ " Close = "+ EncodeColor(52)+ WriteVal(C,dec)+ EncodeColor(55)+ " Volume = "+ EncodeColor(52)+ WriteVal(V,1); _SECTION_END(); _SECTION_BEGIN("Magnified Market Price"); //by Vidyasagar, vkunisetty@yahoo.com// FS=Param("Font Size",30,30,100,1); GfxSelectFont("Arial", FS, 900, italic = False, underline = False, True ); GfxSetBkMode( colorWhite ); GfxSetTextColor( ParamColor("Color",colorYellow) ); //Hor=Param("Horizontal Position",800,800,800,800); Hor=Param("Horizontal Position",20,20,500,20); Ver=Param("Vertical Position",50,50,250,50); GfxTextOut(""+C,Hor , Ver ); 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 ); Buy=xx>=2; _SECTION_END(); //SetChartOptions(0,chartShowArrows | chartShowDates); _SECTION_BEGIN("Heikin Ashi"); _SECTION_END(); _SECTION_BEGIN("NICK MA Swing"); SetBarsRequired(200,0); GraphXSpace = 5; SetChartOptions(0,chartShowArrows|chartShowDates); k = Optimize("K",Param("K",1,0.25,5,0.25),0.25,5,0.25); Per= Optimize("atr",Param("atr",4,3,20,1),3,20,1); HACLOSE=(O+H+L+C)/4; HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "" + Name(), colorBlack, styleCandle | styleNoLabel ); j=Haclose; //======================================================================================================================= //=========================Indicator============================================================================================== f=ATR(14); rfsctor = WMA(H-L, Per); revers = k * rfsctor; Trend = 1; NW[0] = 0; for(i = 1; i < BarCount; i++) { if(Trend[i-1] == 1) { if(j[i] < NW[i-1]) { Trend[i] = -1; NW[i] = j[i] + Revers[i]; } else { Trend[i] = 1; if((j[i] - Revers[i]) > NW[i-1]) { NW[i] = j[i] - Revers[i]; } else { NW[i] = NW[i-1]; } } } if(Trend[i-1] == -1) { if(j[i] > NW[i-1]) { Trend[i] = 1; NW[i] = j[i] - Revers[i]; } else { Trend[i] = -1; if((j[i] + Revers[i]) < NW[i-1]) { NW[i] = j[i] + Revers[i]; } else { NW[i] = NW[i-1]; } } } } //===============system================ Buy=Cover=Cross(j,nw); Sell=Short=Cross(nw,j); SellPrice=ValueWhen(Sell,C,1); BuyPrice=ValueWhen(Buy,C,1); Long=Flip(Buy,Sell); Shrt=Flip(Sell,Buy ); _SECTION_END(); ////////////////////////////////////////// //Calculates Seconds Left for New Bar // ///////////////////////////////////////// function GetSecondNum() { Time = Now( 4 ); Seconds = int( Time % 100 ); Minutes = int( Time / 100 % 100 ); Hours = int( Time / 10000 % 100 ); SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds ); return SecondNum; } RequestTimedRefresh( 1 ); TimeFrame = Interval(); SecNumber = GetSecondNum(); Newperiod = SecNumber % TimeFrame == 0; SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame; SecsToGo = TimeFrame - SecsLeft; x=Param("xposn",50,0,1000,1); y=Param("yposn",380,0,1000,1); GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) ); GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 ); if ( NewPeriod ) { GfxSelectSolidBrush( colorYellow ); GfxSelectPen( colorYellow, 2 ); /*Say( "New period" );*/ } //GfxRoundRect( x+45, y+40, x-3, y-2, 0, 0 ); //GfxSetBkMode(1); /*GfxSelectFont( "Arial", 14, 700, False ); GfxSetTextColor( colorRed ); GfxTextOut( "Time Left for next Bar : " + SecsToGo+" sec"+"", x, y ); ;*/ //////////////////////////////////////////// //=================TITLE================================================================================================ _SECTION_BEGIN("Title"); if( Status("action") == actionIndicator ) ( Title = EncodeColor(colorWhite)+ "copyright2015 www.stockbuysellsignal.com" +"\n" + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) + " - " + Date() +" - "+"\n" +EncodeColor(colorYellow) +"Op-"+O+" "+"Hi-"+H+" "+"Lo-"+L+" "+ "Cl-"+C+" "+ "Vol= "+ WriteVal(V)+"\n"); /*WriteIf (Buy , " GO LONG / Reverse Signal at "+C+" ","")+ WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+" ","")+"\n"+EncodeColor(colorYellow)+ WriteIf(Long AND NOT Buy, "Trade : Buy @ "+(BuyPrice),"")+ WriteIf(shrt AND NOT Sell, "Trade : Sell @ "+(SellPrice),"")+"\n"+ WriteIf(Long AND NOT Buy, "Current Profit/Loss = Rs."+(C-BuyPrice)*500+"","")+ WriteIf(shrt AND NOT Sell, "Current Profit/Loss = Rs."+(SellPrice-C)*500+"",""));*/ PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40); PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50); PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40); PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50); PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45); AlertIf( Buy, "SOUND C:\\Windows\\Media\\Ringin.wav", "Audio alert", 1 ); AlertIf( Sell, "SOUND C:\\Windows\\Media\\Ringin.wav", "Audio alert", 2 ); ////////////////////////////////////////// ///////////////////////////////////////// trend[0]=1; TrendUp=TrendDown=Null; 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 * .0030); tar2 = entry + (entry * .0047); tar3 = entry + (entry * .0065); bars = i; i = 0; } if(Sell[i] == 1) { sig = "SELL"; entry = C[i]; sl = TrendSL[i]; tar1 = entry - (entry * .0030); tar2 = entry - (entry * .0047); tar3 = entry - (entry * .0065); 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|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, 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 TL2, ParamColor("TL Up Colour", colorBrightGreen), ParamColor("TL Dn Colour", colorCustom12)); Plot(TL1, "TriggerLine 1", Col1, styleLine|styleThick|styleNoLabel); Plot(TL2, "TriggerLine 2", Col1, styleLine|styleThick|styleNoLabel); _SECTION_END(); _SECTION_BEGIN("Volume At Price"); PlotVAPOverlay( Param("Lines", 300, 100, 1000, 1 ), Param("Width", 5, 1, 100, 1 ), ParamColor("Color", colorCycle ), ParamToggle("Side", "Left|Right" ) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );