// Downloaded From https://www.WiseStockTrader.com #include ; Plot(T3(C,3),"T3(3)",colorCustom3,styleThick); Plot(T3(C,5),"T3(5)",colorCustom3,styleThick); Buy = Cross (T3(C,3), T3(C,5))AND StrLen(Name())==3; Sell = Cross (T3(C,5), T3(C,3))AND StrLen(Name())==3; _SECTION_BEGIN("Price"); SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )), ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 ))); SetChartOptions(0,chartShowDates|chartShowArrows|chartLogarithmic|chartWrapTitle); _N(Title = StrFormat("{{NAME}} - Sector: "+SectorID(1)+" - {{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, "", IIf(Close > Open, colorGreen, colorRed), styleBar + styleThick + styleNoLabel); _SECTION_END(); Plot(T3(C,15),"T3(15)",colorCustom11,styleThick); Plot(T3(C,5),"T3(5)",colorCustom11,styleThick); Buy = Cross (T3(C,15), T3(C,15))AND StrLen(Name())==10; Sell = Cross (T3(C,5), T3(C,10))AND StrLen(Name())==10; _SECTION_BEGIN ("contact"); GfxTextOut( ": J.C.HURKADLI :",150, 20); _SECTION_END(); _SECTION_BEGIN("Bollinger Bands"); P = ParamField("Price field",-1); Periods = Param("Periods", 41, 2, 100, 1 ); Width = Param("Width", 2, 0, 10, 0.05 ); Color = ParamColor("Color", colorCustom3 ); Style = ParamStyle("Style"); Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, styleThick ); Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, styleThick ); _SECTION_END(); Plot(C, "", IIf(O>=C, colorRed, colorGreen), ParamStyle("Price Style",styleBar,maskPrice)); ////////////////////////////////////////////////////////////////// _SECTION_BEGIN("Fib Retracements"); fibs = ParamToggle("Plot Fibs","Off|On",1); pctH = Param ("Pivot Hi %", 0.325,0.001,2.0,0.002); HiLB = Param ("Hi LookBack",1,1,BarCount-1,1); pctL = Param ("Pivot Lo %", 0.325,0.001,2.0,0.002); LoLB = Param ("Lo LookBack",1,1,BarCount-1,1); Back = Param ("Extend Left = 2",1,1,500,1); Fwd = Param("Plot Forward", 0, 0, 500, 1); text = ParamToggle("Plot Text","Off|On",1); hts = Param ("Text Shift", -33.5,-50,50,0.10); style =ParamStyle("Line Style",styleLine,styleNoLabel); x = BarIndex(); pRp = PeakBars( H, pctH, 1) == 0; yRp0 = SelectedValue(ValueWhen( pRp, H, HiLB)); xRp0 = SelectedValue(ValueWhen( pRp, x, HiLB)); pSp = TroughBars( L, pctL, 1) == 0; ySp0 = SelectedValue(ValueWhen( pSp, L, LoLB)); xSp0 = SelectedValue(ValueWhen( pSp, x, LoLB)); Delta = yRp0 - ySp0; function fib(ret) { retval = (Delta * ret); Fibval = IIf(ret < 1.0 AND xSp0 < xRp0, yRp0 - retval, IIf(ret < 1.0 AND xSp0 > xRp0, ySp0 + retval,IIf(ret > 1.0 AND xSp0 < xRp0, yRp0 - retval, IIf(ret > 1.0 AND xSp0 > xRp0, ySp0 + retval, Null)))); return FibVal; } x0 = Min(xSp0,xRp0)-Back; x1 = (BarCount -1); ////////////////////////////////////////////////////////////////// r236 = fib(0.236); r236I = LastValue (r236,1); r382 = fib(0.382); r382I = LastValue (r382,1); r050 = fib(0.50); r050I = LastValue (r050,1); r618 = fib(0.618); r618I = LastValue (r618,1); r786 = fib(0.786); r786I = LastValue (r786,1); e127 = fib(1.27); e127I = LastValue (e127,1); e162 = fib(1.62); e162I = LastValue (e162,1); e200 = fib(2.00); e200I = LastValue (e200,1); e262 = fib(2.62); e262I = LastValue (e262,1); e424 = fib(4.24); e424I = LastValue (e424,1); ////////////////////////////////////////////////////////////////// p00 = IIf(xSp0 > xRp0,ySp0,yRp0); p00I = LastValue (p00,1); p100 = IIf(xSp0 < xRp0,ySp0,yRp0); p100I = LastValue (p100,1); color00 =IIf(xSp0 > xRp0,colorLime,colorRed); color100 =IIf(xSp0 < xRp0,colorLime,colorRed); ////////////////////////////////////////////////////////////////// numbars = LastValue(Cum(Status("barvisible"))); fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2); ////////////////////////////////////////////////////////////////// if(fibs==1) { Plot(LineArray(xRp0-Fwd,yRp0,x1,yRp0,Back),"PR",32,8|styleNoRescale,Null, Null,Fwd); Plot(LineArray(xSp0-Fwd,ySp0,x1,ySp0,Back),"PS",27,8|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r236,x1,r236,Back),"",45,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r382,x1,r382,Back),"",44,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r050,x1,r050,Back),"",41,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r618,x1,r618,Back),"",43,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r786,x1,r786,Back),"",42,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e127,x1,e127,Back),"e127",47,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e162,x1,e162,Back),"e162",47,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e200,x1,e200,Back),"p200",47,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e262,x1,e262,Back),"p262",47,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e424,x1,e424,Back),"p424",25,style|styleNoRescale,Null, Null,Fwd); } ////////////////////////////////////////////////////////////////// if(text==1) { PlotText(" 0% = " + WriteVal(p00,fraction), LastValue(BarIndex())-(numbars/hts), p00I + 0.05, color00); PlotText("23% = " + WriteVal(r236,fraction), LastValue(BarIndex())-(numbars/hts), r236I + 0.05, 45); PlotText("38% = " + WriteVal(r382,fraction), LastValue(BarIndex())-(numbars/hts), r382I + 0.05, 44); PlotText("50% = " + WriteVal(r050,fraction), LastValue(BarIndex())-(numbars/hts), r050I + 0.05, 41); PlotText("62% = " + WriteVal(r618,fraction), LastValue(BarIndex())-(numbars/hts), r618I + 0.05, 43); PlotText("78% = " + WriteVal(r786,fraction), LastValue(BarIndex())-(numbars/hts), r786I + 0.05, 42); PlotText("100% = " + WriteVal(p100,fraction), LastValue(BarIndex())-(numbars/hts),p100I + 0.05, color100); PlotText("127% = " + WriteVal(e127,fraction), LastValue(BarIndex())-(numbars/hts),e127I + 0.05, 47); PlotText("162% = " + WriteVal(e162,fraction), LastValue(BarIndex())-(numbars/hts),e162I + 0.05, 47); PlotText("200% = " + WriteVal(e200,fraction), LastValue(BarIndex())-(numbars/hts),e200I + 0.05, 47); PlotText("262% = " + WriteVal(e262,fraction), LastValue(BarIndex())-(numbars/hts),e262I + 0.05, 47); PlotText("424% = " + WriteVal(e424,fraction), LastValue(BarIndex())-(numbars/hts),e424I + 0.05, 25); } _SECTION_END(); ////////////////////////////////////////////////////////////////// _SECTION_BEGIN("Magnified Market Price"); //by Vidyasagar, vkunisetty@yahoo.com// FS=Param("Font Size",20,20,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",50,50,500,20); Ver=Param("Vertical Position",20,20,250,50); GfxTextOut(""+C,Hor , Ver ); YC=TimeFrameGetPrice("C",inDaily,-1); DD=Prec(C-YC,2); xx=Prec((DD/YC)*100,2); GfxSelectFont("Arial",1, 200, italic = False, underline = False, True ); GfxSetBkMode( colorWhite ); GfxSetTextColor(ParamColor("Color",colorYellow) ); GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+33 ); _SECTION_END(); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _SECTION_BEGIN( "AA - Fibonacci Retracements and Goals" ); /////////////////////////////////////////////////// // **************** Parameters ******************** // Period = Param( "Period", 5.00, 0.25, 50, 0.25 ); ShowExt = ParamToggle( "Show Extension ?", "No|Yes", 0 ); /////////////////////////////////////////////////// // **************** Calculations ***************** // Period = Period * ( 13 * .618 ); Hhb = LastValue( Ref( HHVBars( H, Period ), -1 ) ) + 1; Llb = LastValue( Ref( LLVBars( L, Period ), -1 ) ) + 1; Hv = LastValue( Ref( HHV( H, Period ), -1 ) ); Lv = LastValue( Ref( LLV( L, Period ), -1 ) ); Range = ( Hv - Lv ); LText = "0 %, 23.6 %, 38.2 %, 50 %, 61.8 %, 78.6 %, 100 %, 1.618 %, 1.72 %, 200 %"; if ( Hhb > Llb ) { Levels[0] = Lv; Levels[1] = ( Range * .236 ) + Levels[0]; Levels[2] = ( Range * .382 ) + Levels[0]; Levels[3] = ( Range * .5 ) + Levels[0]; Levels[4] = ( Range * .618 ) + Levels[0]; Levels[5] = ( Range * .786 ) + Levels[0]; Levels[6] = Hv; Levels[7] = ( Range * .618 ) + Levels[6]; Levels[8] = ( Range * .72 ) + Levels[6]; Levels[9] = ( Range ) + Levels[6]; x0 = BarCount - 1 - Llb; x1 = BarCount - 1 - Hhb; } else { Levels[0] = Hv; Levels[1] = Levels[0] - ( Range * .236 ); Levels[2] = Levels[0] - ( Range * .382 ); Levels[3] = Levels[0] - ( Range * .5 ); Levels[4] = Levels[0] - ( Range * .618 ); Levels[5] = Levels[0] - ( Range * .786 ); Levels[6] = Lv; Levels[7] = Levels[6] - ( Range * .618 ); Levels[8] = Levels[6] - ( Range * .72 ); Levels[9] = Levels[6] - ( Range * 1.0 ); x0 = BarCount - 1 - Hhb; x1 = BarCount - 1 - Llb; } ////////////////////////////////////////////////////////////////////////////////////// /// **************************** Plotting Area ******************************** // for ( i = 0; i < 10; i++ ) { if ( i != 6 ) x = x0; else x = x1; if ( i < 7 OR ShowExt ) { Plot( LineArray( x, Levels[i], BarCount, Levels[i] ), "", i + 2, styleDots ); PlotText( StrExtract( LText, i ), BarCount, Levels[i], i + 2); } } _SECTION_END(); /*====================================================== FOREX INTRADAY HEIKIN ASHI + PIVOT POINTS ======================================================*/ //---- heikin ashi HaClose = (O+H+L+C)/4; HaOpen = AMA( Ref( HaClose, -2 ), 0.1 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); xDiff = (HaHigh - Halow) * IIf(StrFind(Name(),"JPY"),100,10000); barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed); PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle ); // Plot(EMA(HaClose,9),"",colorWhite, styleLine); // Plot(EMA(HaClose,18),"",colorBlack, styleLine); _SECTION_BEGIN("Background"); SetChartOptions(0,chartShowArrows|chartShowDates); SetChartBkColor(ParamColor("Outer panel",colorBlack)); // color of outer border SetChartBkGradientFill( ParamColor("Inner panel upper",colorBlack),ParamColor("Inner panel lower",colorBlack)); tchoice=Param("Title Selection ",2,1,2,1); _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(); x=Param("xposn",1,0,1000,1); y=Param("yposn",1,0,1000,1); GfxSetTextColor( colorBlack ); GfxTextOut( "Created By JAGADISH.C.HURKADLI ", x+1000, y+0 ); /*Developed by Tudor Marcelin - Art Invest*/ HLper=Param("EMA period",21,3,35); Lagper=Param("Lag period",10,3,35); HL=EMA(H-L,HLper); LagEMA=Ref(HL,(-1)*Lagper); VCF=100*(HL-LagEMA)/LagEMA; //ATR procedure ATRf(Hp,Lp,Cp,per) { TR=Max(Hp-Lp,Max(abs(Hp-Ref(Cp,-1)),abs(Ref(Cp,-1)-Lp))); TRI=Wilders(TR,per); return TRI; } //Moving Average procedure MAList(type) { global MAType; global MAName; chList = ParamList("Type", List = "1 - EMA,2 - WMA,3 - DEMA,4 - WILDERS", type-1); for( i=0; i<5; i++) {if( StrExtract(List, i) == chList ) MAType = i+1;} MAName = WriteIf(MAType == 1,"EMA", WriteIf(MAType == 2,"WMA", WriteIf(MAType == 3,"DEMA", WriteIf(MAType == 4,"WILDERS","")))); } procedure MAFormula(array,per,type) { CallFormula = IIf(type == 1,EMA(array,Per), IIf(type == 2,WMA(array,Per), IIf(type == 3,DEMA(array,Per), IIf(type == 4,Wilders(array,Per),Null)))); return CallFormula; } MAList(2); AGraphXSpace = 5 ; SetChartOptions(0,chartShowArrows|chartShowDates); Plot(C,"Close",colorWhite, styleCandle); ppl = ParamToggle("Plot Pivot Levels","Off|On",1); numbars = LastValue(Cum(Status("barvisible"))); fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2); hts = -33.5; /* This code calculates the previous days high, low and close */ Hi1 = IIf(Day()!=Ref(Day(),-1),Ref(HighestSince(Day()!=Ref(Day(),-1),H,1),-1),0); Hi = ValueWhen(Day()!=Ref(Day(),-1),Hi1,1); Lo1 = IIf(Day()!=Ref(Day(),-1),Ref(LowestSince(Day()!=Ref(Day(),-1),L,1),-1),0); Lo = ValueWhen(Day()!=Ref(Day(),-1),Lo1,1); Cl1 = IIf(Day()!=Ref(Day(),-1),Ref(C,-1),0); C1 = ValueWhen(Day()!=Ref(Day(),-1),Cl1,1); _SECTION_BEGIN("Heikin Ashi Smoothed"); per1=Param("MA1 period",6,1,10); per2=Param("MA2 period",2,1,10); /* HaOpen = IIf(BarIndex()>0,(Ref((O+H+L+C)/4,-1) + Ref(O,-1))/2 ,Open); HaClose = IIf(BarIndex()>0,((O+H+L+C)/4 +HaOpen+Max(H,HaOpen)+Min(L,HaOpen))/4,Close); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); */ mO=MAFormula(O,per1,MAType); mH=MAFormula(H,per1,MAType); mL=MAFormula(L,per1,MAType); mC=MAFormula(C,per1,MAType); HaClose1 = IIf(BarIndex()>0,(MO+MH+ML+MC)/4,Close); HaOpen1 = IIf(BarIndex()>0,AMA( Ref( HaClose1, -1 ), 0.5 ),Open); HaClose=EMA(HaClose1,per2); HaOpen=EMA(HaOpen1,per2); HaHigh = Max( mH, Max( HaClose, HaOpen ) ); HaLow = Min(mL, Min( HaClose, HaOpen ) ); _SECTION_END(); //O=HaOpen; //H=HaHigh; //L=HaLow; //C=HaClose; //Plot( Close,"Price",colorBlack,styleCandle); barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed); PlotOHLC(HaOpen,HaHigh,HaLow,HaClose,"Price", barcolor, styleArea); Title=EncodeColor(colorWhite)+Date()+" H="+H+" L="+L+EncodeColor(colorWhite)+" C="+C+" ("+NumToStr((C-Ref(C,-1))/Ref(C,-1)*100,1.2)+" %) " ;