Wednesday 9 August 2017

Bollinger Bands Afl


25 de agosto de 2011 IMPORTANTE: Não use o indicador em um sistema de comércio real, olha com antecedência e fará com que você perca dinheiro. É apenas para pesquisa: mostrar lucros potenciais e exibir setas em posições altamente lucrativas para facilitar a formulação de melhores regras de negociação. O indicador apresentado aqui é muito semelhante ao Indicador ZigZag, exceto que os pontos de avanço para este indicador são onde as Bandas Bollinger opostas são ultimamente violadas antes do próximo sinal. A fórmula é escrita como um sistema comercial. Pode ser testado de volta, e o período e a largura do BB podem ser otimizados. Uma vez que esta é apenas uma fórmula experimental, nenhuma tentativa foi feita para otimizar o código. Arquivado por Herman às 8:43 pm sob Indicadores Comentários desativados na Bollinger Band ZigZag Indicator Os comentários estão fechados. Posts recentes Comentários recentes Categorias Copyright (C) 2006 AmiBroker. Este site usa a página do WordPress gerada em 0.535 segundos. BOLLINGER BAND AND CROSS OVER SYSTEM para Amibroker (AFL) SECTIONBEGIN (Bollinger Bands com cross-over e tweaked bar code) P ParamField (Campo de preço, -1) Período Param (Períodos Curtos, 20, 15, 30, 1) Parâmetros de Largura (Largura Curta, 2, 1, 10, 1) TopCondBBandTop (P, Período, Largura) gtRef (BBandTop (P, Período, Largura), - 1) MidCondMA (C, Período) gtRef ( MA (C, Período), - 1) BotCondBBandBot (P, Período, Largura) gtRef (BBandBot (P, Período, Largura), - 1) UpColorIIf (TopCond e MidCond, colorTurquoise, colorPink) DownColorIIf (MidCond AND BotCond, colorTurquoise, ColorPink) PlotOHLC (BBandTop (P, Período, Largura), BBandTop (P, Período, Largura), MA (C, Período), MA (C, Período), UpColor, styleCloudstyleNoLabelstyleNoTitle, Nulo, Nulo, Nulo, -2) PlotOHLC (MA (C, Período), MA (C, Período), BBandBot (P, Período, Largura), BBandBot (P, Período, Largura),, DownColor, styleCloudstyleNoLabelstyleNoTitle, Nulo, Nulo, Nulo, -2) Plot ( BBandBot (P, Período, Largura) ,, colorGreen, styleThickstyleNoTitle Null, Null, Null, -1) Plot (BBandTop (P, Period, Width), colorRed, styleThickstyleNoTitle, Null, Null, Null, -1) Plot (MA (C, Period), colorLime, styleThickstyleNoTitle, Null Null, Null, -1) FilterTopCond e MidCond e BotCond AddColumn (V, volume, 1.0) SECTIONBEGIN (Preço) SetChartOptions (0, chartShowArrowschartShowDates) N (Título StrFormat (- Open g, Hi g, Lo g, Close g (. 1f) Vol WriteVal (V, 1.0), O, H, L, C, SelectedValue (ROC (C, 1)))) trendup IIf (MACD (12,26) gt 0 E MACD (12,26) gt Sinal ( 12,26,9), colorBlue, colorWhite) trendcolor IIf (MACD (12,26) lt 0 E MACD (12,26) lt Sinal (12,26,9), colorRed, trendup) Lote (C, Close, trendcolor , StyleBar styleThick) RSIup RSI (7) gt 70 RSIdown RSI (7) lt 30 sp Param (RSI Período, 7, 1, 100) r RSI (sp) RSIup r gt 70 RSIdown r lt 30 shape RSIup shapeNone RSIdown shapeNone PlotShapes ( Forma, IIf (RSIup, colorBrightGreen, colorRed), 0, IIf (RSIup, Low, High)) se (ParamToggle (Tooltip mostra, todos os valores apenas dos preços)) ToolTipSt RFormat (Abrir: gnHigh: gnLow: gnFechar: g (.1f) nVolume: NumToStr (V, 1), O, H, L, C, SelectedValue (ROC (C, 1))) SECTIONEND () SetChartBkColor (ParamColor (Painel Cor, colorBlack)) PlotOHLC (Open, High, Low, Close,, colorLime, styleBar styleThick) SECTIONBEGIN (trailstops) EntrySignal C gt (LLV (L, 20) 2 ATR (10)) ExitSignal C lt (HHV (H, 20 ) - 2 ATR (10)) Cor IIf (EntrySignal, colorBlue, IIf (ExitSignal, colorOrange, colorGrey50)) TrailStop HHV (C - 2 ATR (10), 15) ProfitTaker EMA (H, 13) 2 ATR (10) trama Gráfico de preços e paradas Plot (TrailStop, Trailing stop, colorGold, styleThick styleLine) Plot (C, Preço, cor, estiloBar) Trama Plot (2,, Cor, styleArea styleOwnScale styleNoLabel, -0.1, 50) SECTIONBEGIN (GFX EMA) Procedimento 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 local Pxwidth, pxheight LocalBase de axisarea local i, x, y if (plinewidthgt0 ampamp Status (ação) 1 ampamp (estilo de amplificador pstyleLinestyleLine)) GfxSetOverlayMode (0) MinyStatus (axisminy) MaxyStatus (axismaxy) lvbStatus (lastvisiblebar) fvbStatus (firstvisiblebar) pxwidthStatus (pxwidth) PxheightStatus (pxheight) TotalBarsLvb-fvb xaxisarea56 se (pshowdate) yaxisarea10 else yaxisarea0 i0 x5i (pxwidth-xaxisarea-10) (TotalBars1) y5yaxisarea (pvalueifvb-Miny) (pxheight-yaxisarea-10) (Maxy-Miny) GfxMoveTo (x, pxheight - y) para (i1 iltTotalBars AND ilt (BarCount-fvb) i) GfxSelectPen (pcolori fvb, plinewidth, 0) x5i (pxwidth-xaxisarea-10) (TotalBars1) y5yaxisarea (pvalueifvb-Miny) (pxheight-yaxisarea-10) ( Maxi-Miny) GfxLineTo (x, pxheight - y) RequestTimedRefresh (2) SECTIONEND () SECTIONBEGIN (Pequenos Disparadores) p1 Param (TL 1 Períodos, 20, 5, 50, 1) p2 Param (TL 2 Periods, 5, 3, 25, 1) TL1 LinearReg (C, p1) TL2 EMA (TL1, p2) Col1 IIf (TL1 gt TL2, ParamColor (TL Up Color, colorBrightGreen), ParamColor (TL Dn Color, colorCustom12)) Plot (TL1, Trigg (TL3 Periods, 80, 5, 100, 1) p4 Param (TL 4 Períodos, 20, 1, Col1, estiloLinestyleThickstyleNoLabel) Plot (TL2, TriggerLine 2, Col1, styleLinestyleThickstyleNoLabel) SECTIONEND () SECTIONBEGIN (Disparadores grandes) p3 Param (TL 3 Períodos, 3, 100, 1) TL3 LinearReg (C, p3) TL4 EMA (TL3, p4) Col1 IIf (TL3 gt TL4, ParamColor (TLL Up Color, colorBlue), ParamColor (TLL Dn Color, colorRed)) Plot (TL3, TriggerLine 3, Col1, styleLinestyleThickstyleNoLabel) Plot (TL4, TriggerLine 4, Col1, styleLinestyleThickstyleNoLabel) SECTIONEND () SECTIONBEGIN (Fibo Retrace and Extensions) fibs 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) Back Param ( Extender a esquerda 2,1,1,500,1) Parâmetros Fwd (Plot Forward, 0, 0, 500, 1) texto ParamToggle (Plot Text, OffOn, 1) hts Param (Text Shift, -33.5, -50,50,0.10) Estilo ParamStyle (Line Style, styleLine, styleNoLabel) x BarIndex () pRp P EKBars (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 - função ySp0 fib (ret) retval (Delta ret) Fibval ​​IIf (ret lt 1.0 E xSp0 lt xRp0, yRp0 - retval, IIf (ret lt 1,0 E xSp0 gt xRp0, ySp0 retval, IIf (ret gt 1.0 E xSp0 lt xRp0, yRp0 - retval, IIf (ret gt 1.0 E xSp0 gt xRp0, ySp0 retval, Null)))) 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 g T 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))) fração IIf (StrRight (Name (), 3), 3.2, 3.2) se (fibs1) Plot (LineArray (xRp0-Fwd, yRp0, x1, yRp0, Voltar ), PR, 32,8styleNoRescale, Null, Null, Fwd) Plot (LineArray (xSp0-Fwd, ySp0, x1, ySp0, Voltar), PS, 27,8styleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd) R236, x1, r236, Voltar) ,, 45, stylestyleNoRescale, Null, Null, Fwd) Lote (LineArray (x0-Fwd, r382, x1, r382, Voltar) ,, 44, stylestyleNoRescale, Null, Null, Fwd) (LineArray (x0-Fwd, r050, x1, r050, Voltar) ,, 41, stylestyleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd, r618, x1, r618, Back) ,, 43, stylestyleNoRescale, Null , Null, Fwd) Plot (LineArray (x0-Fwd, r786, x1, r786, Voltar) ,, 42, stylestyleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd, e127, x1, e127, Voltar), E127,47, stylestyleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd, e162, x1, e162, Back), e162,47, stylest YleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd, e200, x1, e200, Voltar), p200,47, stylestyleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd, e262, x1, e262 Voltar), p262,47, stylestyleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd, e424, x1, e424, Voltar), p424,25, stylestyleNoRescale, Null, Null, Fwd) if (text1) PlotText (0 WriteVal (p00, fração), LastValue (BarIndex ()) - (numbarshts), p00I 0.05, color00) PlotText (23 WriteVal (r236, fração), LastValue (BarIndex ()) - (numbarshts), r236I 0.05, 45 ) PlotText (38 WriteVal (r382, fração), LastValue (BarIndex ()) - (numbarshts), r382I 0.05, 44) PlotText (50 WriteVal (r050, fração), LastValue (BarIndex ()) - (numbarshts), r050I 0.05 , 41) PlotText (62 WriteVal (r618, fração), LastValue (BarIndex ()) - (numbarshts), r618I 0.05, 43) PlotText (78 WriteVal (r786, fração), LastValue (BarIndex ()) - (numbarshts), R786I 0.05, 42) PlotText (100 WriteVal (p100, fração), LastValue (BarIndex ()) - (numbarshts), p100I 0.05, color100) PlotText (127 WriteVal (e127, fração), Último Valor (BarIndex ()) - (numbarshts), e127I 0.05, 47) PlotText (162 WriteVal (e162, fração), LastValue (BarIndex ()) - (numbarshts), e162I 0.05, 47) PlotText (200 WriteVal (e200, fração ), LastValue (BarIndex ()) - (numbarshts), e200I 0.05, 47) PlotText (262 WriteVal (e262, fração), LastValue (BarIndex ()) - (numbarshts), e262I 0.05, 47) PlotText (424 WriteVal (e424 , Fração), LastValue (BarIndex ()) - (numbarshts), e424I 0.05, 25) SECTIONEND () Código para identificar automaticamente pivôs - qual será o nosso alcance de lookback para hh e ll farbackParam (Até onde você vai, 100? , 50,5000,10) nBars Param (Número de barras, 12, 5, 40) Nome do título () (StrLeft (FullName (), 15)) O: Open, H: High, L: Low, C: Close - - Plote o gráfico de vela básico PlotOHLC (aberto, alto, baixo, fechado, n OO nH H nL L

No comments:

Post a Comment