Wednesday 25 January 2017

Bollinger Bandes Afl Amibroker

BOLLINGER BAND ET CROSS OVER SYSTEM pour Amibroker (AFL) SECTIONBEGIN (Bandes de Bollinger avec code de barre croisé et tordu) P ParamField (Champ de prix, -1) Période Param (Short Periods, 20, 15, 30, 1) Width Param Largeur, 2, 1, 10, 1) TopCondBBandTop (P, Période, Largeur) gtRef (BBandTop (P, Période, Largeur), - 1) MidCondMA (C, BotCondBBandBot (P, Période, Largeur) gtRef (BBandBot (P, Période, Largeur), - 1) UpColorIIf (TopCond ET MidCond, colorTurquoise, colorPink) DownColorIIf (MidCond et BotCond, colorTurquoise, colorPink) PlotOHLC (BB, Largeur), BBandTop (P, Période, Largeur), MA (C, Période), MA (C, Période),, UpColor, styleCloudstyleNoLabelstyleNoTitle, Null, Null, Null, -2) PlotOHLC (C, Période), BBandBot (P, Période, Largeur), BBandBot (P, Période, Largeur),, DownColor, styleCloudstyleNoLabelstyleNoTitle, Null, Null, Null, -2) Tracé (BBandBot ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ColorLarge, (0, chartShowArrowschartShowDates) N (Titre StrFormat (- Ouvrir g, Hi g, Lo g, Fermer, Fermer, Fermer) G (0,1f) Vol-WriteVal (V, 1,0), O, H, L, C, SelectedValue (ROC (C, 1))) trendup IIf (MACD (12,26) gt 0 et MACD (12,26) Gt Signal (12,26,9), colorBlue, colorWhite) trendcolor IIf (MACD (12,26) lt 0 ET MACD (12,26) lt Signal (12,26,9), colorRed, trendup) Plot (C, (RSI Period, 7, 1, 100) r RSI (sp) RSIup r gt 70 RSIdown r lt 30 forme RSIup shapeNone RSIdown ShapeNone PlotShapes (forme, IIf (RSIup, colorBrightGreen, colorRed), 0, IIf (RSIup, Low, High)) si (ParamToggle (Tooltip affiche, tous les valeurs uniquement les prix)) ToolTipStrFormat (Open: gnHigh: gnLow: ) () () () () () () () () () () () () () () () () () () ColorPolice , Close,, colorLime, styleBar styleThick) SECTIONBEGIN (trailstops) EntréeSignal Cgt (LLV (L, 20) 2 ATR (10)) ExitSignal C lt (HHV (H, 20) - 2 ATR (10), 15) ProfitTaker EMA (H, 13) 2 ATR (10) diagramme des prix des parcelles et arrêts Tracé (TrailStop, Trailing stop, colorGold), colorBlue, IIf (ExitSignal, colorOrange, colorGrey50) , StyleThick styleLine) Tracé (C, Prix, couleur, styleBar) tracé de couleur ruban Tracé (2,, Color, styleArea styleOwnScale styleNoLabel, -0.1, 50) SECTIONBEGIN (GFX EMA) procédure Plotlinewidth (pvalue, ptitle, pcolor, pstyle, pmin , Pmax, pxshift, plinewidth, pshowdate8203) local pvalue, ptitle, pcolor, pstyle, pmin, pmax, pxshift, plinewidth, ppenstyle, pshowdate local Miny, Maxy local Lvb, fvb pxwidth local, pxheight local TotalBars, axisarea local i, Y if (plinewidthgt0 ampamp Etat (action) 1 ampamp (pstyle amp styleLinestyleLine)) GfxSetOverlayMode (0) MinyStatus (axisminy) MaxyStatus (axismaxy) lvbStatus (lastvisiblebar) fvbStatus (première barre visible) pxwidthStatus (pxwidth) pxheightStatus (pxheight) TotalBarsLvb-fvb xaxisarea56 if (Pshowdate) yaxisarea10 autre yaxisarea0 i0 x5i (pxwidth-xaxisarea-10) (TotalBars1) y5yaxisarea (pvalueifvb-Miny) (pxheight-yaxisarea-10) (Maxy-Miny) GfxMoveTo (x, pxheight-y) (), () (), () () () () () () () () () P1 Param (TL 1 Périodes, 20, 5, 50, 1) p2 Param (TL 2 Périodes, 5, 3, 25, 1) TL1 Régulation linéaire (C, P1) TL2 EMA (TL1, p2) Col1 IIf (TL1 gt TL2, ParamColor (Couleur TL Up, CouleurBrightGreen), ParamColor (Couleur TL Dn, ColorCustom12)) Tracé (TL1, TriggerLine 1, Col1, styleLinestyleThickstyleNoLabel) (TL 3 périodes, 80, 5, 100, 1) p4 Param (TL 4 périodes, 20, 3, 100, 1) TL3 Régulation linéaire (C, p3) (TL3, TriggerLine 3, Col1, styleLinestyleThickstyleNoLabel) Tracé (TL4, TriggerLine 4) TL4 EMA (TL3, p4) Col1 IIf (TL3 gt TL4, ParamColor (TLL Up Color, colorBlue) , Col1, styleLinestyleThickstyleNoLabel) SECTIONEND () SectionBEGIN (Fibo Retrace et Extensions) Fibo ParamToggle (Plot Fibs, OffOn, 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) Retour Param (Extend Left 2,1,1,500,1) Fwd Param Paramètre (Texte de tracé, OffOn, 1) Paramètre (Décalage de texte, -33,5, -50,50,0,10) ParamStyle (Style de ligne, StyleLine, StyleNoLabel) x BarIndex (Texte de tracé, 0, (PRp, x, HiLB)) pSp TroughBars (L, pctL, 1) 0 ySp0 SelectedValue (ValueWhen (pRp, H, HiLB)) pRp PeakBars (H, pctH, 1) 0 yRp0 SelectedValue (PSp, L, LoLB)) xSp0 SelectedValue (ValeurQuand (pSp, x, LoLB)) Delta yRp0 - ySp0 fonction fib (ret) retval (Delta ret) Fibval ​​IIf (retour lt 1.0 ET xSp0 lt xRp0, yRp0 - retval, IIf (Ret lt 1.0 ET xSp0 gt xRp0, ySp0 retval, IIf (ret gt 1.0 et xSp0 lt xRp0, yRp0 - retval, IIf (ret gt 1.0 ET xSp0 gt xRp0, ySp0 retval, Null)))) retour FibVal x0 Min (xSp0 , XRp0) - Retour x1 (BarCount -1) r236 fib (0,236) r236I DernièreValeur (r236,1) r382 fib (0.382) r382I DernièreValeur (r382,1) r050 fib (0.50) r050I DernièreValeur (r050,1) r618 fib 0.618) r618I LastValue (r618,1) r786 fib (0.786) r786I DernièreValeur (r786,1) e127 fib (1.27) e127I DernièreValeur (e127,1) e162 fib (1.62) e162I DernièreValeur (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 gt xRp0, ySp0, yRp0) p00I LastValue (p00,1) p100 IIf (xSp0 lt xRp0, ySp0, yRp0) p100I LastValue (p100,1) color00 IIf (xSp0 gt xRp0, colorLime, colorRed) color100 IIf (xSp0 lt xRp0, colorLime, colorRed) numbars LastValue (Cum (Status (barvisible))) Fraction (IIR) (StrRight (Nom (), 3), 3.2, 3.2) if (fibs1) Tracé (LineArray (xRp0-Fwd, yRp0, x1, yRp0, Back), PR, 32,8styleNoRescale, Null, Null, Fwd) (LineArray (xSp0-Fwd, ySp0, x1, ySp0, Back), PS, 27,8styleNoRescale, Null, Null, Fwd) Plot (LineArray (x0- Fwd, r236, x1, r236, Back) ,, 45 stylestyleNoRescale, Null, Null, Fwd) Tracé (LineArray (x0-Fwd, r050, x1, r050, Back), 44, stylestyleNoRescale, Null, Null, Fwd) , 41, stylestyleNoRescale, Null, Null, Fwd) Tracé (LineArray (x0-Fwd, r786, X1, e127, Back), e127, 47, stylestyleNoRescale, Null, Null, Fwd) Plot (LineArray) (X0-Fwd, e162, x1, e162, Back), e162,47, stylestyleNoRescale, Null, Null, Fwd) Tracé (Linearray (x0-Fwd, e200, x1, e200, Retour), p200,47, stylestyleNoRescale, Null , Null, Fwd) Tracé (LineArray (x0-Fwd, e424, x1, e424, Back), p262,47, stylestyleNoRescale, Null, , P424,25, stylestyleNoRescale, Null, Null, Fwd) si (text1) PlotText (0 WriteVal (p00, fraction), LastValue (BarIndex ()) - (numbarshts), p00I 0.05, ), LastValue (BarIndex ()) - (numbarshts), r236I 0.05, 45) PlotText (38 WriteVal (r382, fraction), LastValue (BarIndex ()) - (numbarshts), r382I 0.05, 44) R050, fraction), LastValue (BarIndex ()) - (numbarshts), r050I 0.05, 41) PlotText (62 WriteVal (r618, fraction), LastValue (BarIndex ()) - (numbarshts), r618I 0.05, 43) WriteVal (p100, fraction), LastValue (BarIndex ()) - (numbarshts), p100I 0.05, color100) PlotText (126 WriteVal (e127, fraction), LastValue (BarIndex ()) - (numbarshts), e127I 0.05, 47) PlotText (162 WriteVal (e162, fraction), LastValue (BarIndex ()), e162I 0.05, 47 ) PlotText (200 WriteVal (e200, fraction), LastValue (BarIndex ()) - (numbarshts), e200I 0.05, 47) PlotText (262 WriteVal (e262, fraction), LastValue (BarIndex ()) - (numbarshts), e262I 0.05 , 47) PlotText (424 WriteVal (e424, fraction), LastValue (BarIndex ()) - (numbarshts), e424I 0.05, 25) SECTIONEND () Code pour identifier automatiquement les pivots - quelle sera notre gamme de lookback pour les hh et ll (Nombre de barres, 12, 5, 40) Nom du titre () (StrLeft (FullName (), 15)) O: Ouvert, H: Élevé IMPORTANT: Ne pas utiliser l'indicateur dans un système commercial réel, il regarde à l'avance dans le temps Et vous fera perdre de l'argent. Il est destiné à la recherche uniquement: pour montrer les bénéfices potentiels et afficher des flèches à des positions très rentables pour faciliter la formulation de meilleures règles commerciales. L'indicateur présenté ici est très semblable à l'indicateur ZigZag, sauf que les points de retournement pour cet indicateur sont où les bandes de Bollinger opposées sont brisées en dernier avant le prochain signal. La formule est écrite comme un système commercial. Il peut être Backtested, et la période BB et la largeur peuvent être optimisés. Comme il s'agit simplement d'une formule expérimentale, aucune tentative n'a été faite pour optimiser le code. Classé par Herman à 20h43 sous Indicateurs Commentaires désactivés sur Bollinger Band ZigZag Indicateur Les commentaires sont fermés. Articles récents Commentaires récents Copyright (C) 2006 AmiBroker. Ce site utilise WordPress Page générée en 0.535 secondes.


No comments:

Post a Comment