Skip to main content

Posts

Showing posts from November, 2017

Auto trendlines

_SECTION_BEGIN("Trendlines Multitimeframe"); // Amibroker AFL code by Edward Pottasch, 6/8/2011 // Using fractals to create automatic trendlines // Using option to show multiple timeframes Version(5.21); xx=BarIndex();x=xx;Lx=LastValue(x); nbar=Param("N Pivot Bars",3,2,50,1); tf=Param("Time Frame (min)",5,1,100000,1);tfrm=in1Minute*tf; CleanPivots=ParamToggle("Use Clean Pivots","Off|On",0); PivotSymmetry=ParamToggle("Use Symmetric Pivots","Off|On",0); tld=ParamToggle("All trendlines","Show|Hide",1); showSignals=ParamToggle("Display signals","Off|On",0); TimeFrameSet(tfrm); if (PivotSymmetry) {     fc=1;     pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;     tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L; } else {     fc=2;     pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;     tr=L<Ref(LLV(L,nbar*f...

Faulal Wilders SuperTrend

_SECTION_BEGIN("TREND"); SetBarsRequired(100000,0); GraphXSpace = 15; ea = Wilders (C,56); eb = Wilders (C,70); SetBarFillColor( IIf( ea > eb, colorGreen, colorRed ) ); Plot( C, "Price", IIf( ea > eb, colorGreen, colorRed ), styleCandle ); Buy = ea > eb AND TimeNum() > 092000 AND TimeNum() < 150000; Sell = eb > ea OR TimeNum() > 150000; Short = 0; Cover = 0; Buy = ExRem(Buy,Sell); Sell = ExRem(Sell,Buy); Short = ExRem(Short,Cover); Cover = ExRem(Cover,Short); SetTradeDelays(1,1,1,1); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Factor=Param("Factor",3,1,10,1); Pd=Param("ATR Periods",100,1,100,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]...

Wilders Color Code Faulal

//============== TITLE ============== _SECTION_BEGIN("Magnified Market Price"); FS=Param("Font Size",30,11,100,1); GfxSelectFont("Times New Roman", FS, 700, True ); GfxSetBkMode( colorWhite );  GfxSetTextColor( ParamColor("Color",colorGold) ); Hor=Param("Horizontal Position",970,1,1200,1); Ver=Param("Vertical Position",50,1,830,1); GfxTextOut(""+C, Hor , Ver ); YC=TimeFrameGetPrice("C",inDaily,-1); DD=Prec(C-YC,2); xx=Prec((DD/YC)*100,2); GfxSelectFont("Times New Roman", 11, 700, True ); GfxSetBkMode( colorWhite );  GfxSetTextColor(ParamColor("Color",colorBlack) ); GfxTextOut(""+DD+"  ("+xx+"%)", Hor , Ver+45 ); _SECTION_END(); //Facebook.com/trendnifty Like  Learn Earn e1=Wilders(C,56); e2=Wilders(C,70); e3=Wilders(C,70); b1=Cross(e1,e2); s1=Cross(e3,e1); Buysetup=Flip(b1,s1); Shortsetup=Flip(s1,b1); trend=IIf(BarsSince(Buysetup)<BarsSince(Shortsetu...

KBL Master Scalper Pro.

_SECTION_BEGIN("HA"); tchoice=Param("Title Selection ",2,1,2,1); Q=Param("% Change",2.1,1,10,1); Z= Ref(Zig(C ,q ),-1) ; HH=Ref(((Z<Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2)) AND (Peak(z,q,1 ) >Peak(Z,q,2))),-1); LH=Ref(((Z<Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2)) AND (Peak(Z,q,1 ) <Peak(Z,q,2))),-1); HL=Ref(((Z>Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2)) AND (Trough(Z,q,1 ) >Trough(Z,q,2))),-1); LL=Ref(((Z>Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2)) AND (Trough(Z,q,1 ) <Trough(Z,q,2))),-1); GraphXSpace = 5; dist = 0.5*ATR(20); for( i = 0; i < BarCount; i++ ) { if( HH[i] ) PlotText( "HH", i, H[ i ]+dist[i], colorCustom12 ); if( LH[i] ) PlotText( "LH", i, H[ i ]+dist[i], colorCustom12 ); if( HL[i] ) PlotText( "HL", i, L[ i ]-dist[i], colorBlack ); if( LL[i] ) PlotText( "LL", i, L[ i ]-dist[i], colorBlack ); } //calculates floor pivots from previous days data & plots it on the present intraday ...

Wilders AFL Crossover

PM1 = Param("MA1",56,1,1500,1); PM2 = Param("MA2",70,1,1500,1); M1 = Wilders(Close,PM1); M2 = Wilders(Close,PM2); A = Cross(M1,M2); B = Cross(M2,M1); Hor1=Param(" LEFT/RIGHT",1,1,1660,1); Ver1=Param(" UP DOWN",35,1,830,1); FS1=Param(" Font Size",15,11,100,1); GfxSelectFont("Tahoma", FS1, 200 ); GfxSetBkColor(colorBlack); GfxSetTextColor(colorGold); GfxTextOut("EMA "+ PM1 + " "+ Prec(M1,2),Hor1,Ver1); GfxSetTextColor(colorGreen); GfxTextOut("EMA "+ PM2 + " "+ Prec(M2,2),Hor1,Ver1+25); Plot(M1," EMA: "+pm1,ParamColor("FAST EMA COLOR",colorGreen)); Plot(M2," EMA: "+pm2,ParamColor("SLOW EMA COLOR",colorRed)); PlotShapes(IIf(A,shapeUpArrow,shapeNone),colorYellow,0,L,Offset= -30); PlotShapes(IIf(B,shapeDownArrow,shapeNone),colorCustom12,0,H,Offset = -30); Filter = (A == 1) OR (B == 1); AddColumn(A,"BUY/SELL",1,IIf(A,colorGreen,colorRed),co...

AFL INTRADAY

 _SECTION_BEGIN("Stupid Functions"); RequestTimedRefresh( 1 ); function HAI_F1(no) { res=HHV(H,no); sup=LLV(L,no); avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0)); avn=ValueWhen(avd!=0,avd,1); return (IIf(avn==1,sup,res)); } function HAI_F2(no) { return (Cross(C,HAI_F1(no))); } function HAI_F3(no) { return (Cross(HAI_F1(no),C)); } function HAI_F4(no) { 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(C<Ref(Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))),-1),Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),PREV)); a=Cross(Close,d); b=Cross(d,Close); return (IIf(BarsSince(a)<BarsSince(b),1,0)); } function HAI_F5(no) { state = HAI_F4(no); s=state>Ref(state,-1); ss=state<Ref(state,-1); return (state==Ref(state,-1)); } function HAI_F6(p,n,s,m) { return (PDI(p)>MDI(n)AND Signal(s)<MACD(m)); } function HAI_F7(p,n,s,m...

AccuTrade Trend positional

"plotted pivots \n Plotted the avarage as a bars \n "; _SECTION_BEGIN("average as a bar"); /*  Heikin-Ashi(Koma-Ashi) with Moving Average Type */ SetChartOptions(2, chartWrapTitle); // Calculate Moving Average MAPeriod = Param("MA Period", 15, 1, 100); MAOpen = EMA(Open, MAPeriod); MAHigh = EMA(High, MAPeriod); MALow = EMA(Low, MAPeriod); MAClose = EMA(Close, MAPeriod); HaClose = (MAOpen + MAHigh + MALow + MAClose) / 4; HaOpen = AMA(Ref(HaClose, -1), 0.5); // for graph collapse for(i = 0; i <= MAPeriod; i++) HaClose[i] = Null; /* // same // HaOpen = (Ref(HaOpen, -1) + Ref(HaClose, -1)) / 2; HaOpen[ 0 ] = HaClose[ 0 ]; for(i = 1; i < BarCount; i++) {     HaOpen[i] = (HaOpen[i - 1] + HaClose[i - 1]) / 2; } */ HaHigh = Max(MAHigh, Max(HaClose, HaOpen)); HaLow = Min(MALow, Min(HaClose, HaOpen)); // outs comments "BarIndex = " + BarIndex(); "Open = " + Open; "High = " + High; "Low = " + Low; "Close = "+...

AccuTrade Trend intraday

"plotted pivots \n Plotted the avarage as a bars \n "; _SECTION_BEGIN("average as a bar"); /*  Heikin-Ashi(Koma-Ashi) with Moving Average Type */ SetChartOptions(2, chartWrapTitle); // Calculate Moving Average MAPeriod = Param("MA Period", 15, 1, 100); MAOpen = EMA(Open, MAPeriod); MAHigh = EMA(High, MAPeriod); MALow = EMA(Low, MAPeriod); MAClose = EMA(Close, MAPeriod); HaClose = (MAOpen + MAHigh + MALow + MAClose) / 4; HaOpen = AMA(Ref(HaClose, -1), 0.5); // for graph collapse for(i = 0; i <= MAPeriod; i++) HaClose[i] = Null; /* // same // HaOpen = (Ref(HaOpen, -1) + Ref(HaClose, -1)) / 2; HaOpen[ 0 ] = HaClose[ 0 ]; for(i = 1; i < BarCount; i++) {     HaOpen[i] = (HaOpen[i - 1] + HaClose[i - 1]) / 2; } */ HaHigh = Max(MAHigh, Max(HaClose, HaOpen)); HaLow = Min(MALow, Min(HaClose, HaOpen)); // outs comments "BarIndex = " + BarIndex(); "Open = " + Open; "High = " + High; "L...