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)) ToolT IpStrFormat (Abrir: gnHigh: gnLow: gnFechar: g (.1f) nVolume: NumToStr (V, 1), O, H, L, C, SelectedValue (ROC (C, 1))) SECÇÃO () 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 local TotalBars, axisarea local i, x, y if (plinewidthgt0 ampamp Status (ação) 1 ampamp (pstyle amp styleLinestyleLine)) 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, (Pb), (pb), (iB) 1) (5) (5) (5) (xl) - (x) (Maxy-Miny) GfxLineTo (x, pxheight-y) RequestTimedRefresh (2) SECTIONEND () SECTIONBEGIN (Disparadores pequenos) 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)) Plo T1 (TL1, TriggerLine 1, Col1, styleLinestyleThickstyleNoLabel) Plot (TL2, TriggerLine 2, Col1, styleLinestyleThickstyleNoLabel) SECTIONEND () SECTIONBEGIN (Disparadores grandes) p3 Param (TL 3 Períodos, 80, 5, 100, 1) p4 Param (TL 4 Períodos, 20, 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 (Olá 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 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 BarIn Dex () 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 - 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 AND 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)))) 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 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))) fração IIf (StrRight (Name (), 3), 3.2, 3.2) if (fibs1) Plot (LineArray (xRp0-Fwd, yRp0, x1, YRp0, Back), PR, 32,8styleNoRescale, Null, Null, Fwd) Lote (LineArray (xSp0-Fwd, ySp0, x1, ySp0, Voltar), PS, 27,8styleNoRescale, Null, Null, Fwd) Lote (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) Plot (LineArray (x0-Fwd, r050, x1, r050, Voltar) ,, 41, stylestyleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd, r618, x1, r618, Back) ,, 43, StylelineNoRescale, Null, Null, Fwd) Lote (LineArray (x0-Fwd, r786, x1, r786, Voltar) ,, 42, stylestyleNoRescale, Null, Null, Fwd) Lote (LineArray (x0-Fwd, e127, x1, e127, Voltar), e127,47, stylestyleNoRescale, Null, Null, Fwd) Plot (LineArray (x0-Fwd, e162, x1, e162, Back), e16 2,47, stylestyleNoRescale, 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 (Texto1) PlotText (0 WriteVal (p00, fração), LastValue (BarIndex ()) - (numbars hts), p00I 0.05, color00) PlotText (23 WriteVal (r236, fração), LastValue (BarIndex ()) - (numbars hts ), R236I 0.05, 45) PlotText (38 WriteVal (r382, fração), LastValue (BarIndex ()) - (numbars hts), r382I 0.05, 44) PlotText (50 WriteVal (r050, fração), LastValue (BarIndex ()) - (numbars hts), r050I 0.05, 41) PlotText (62 WriteVal (r618, fração), LastValue (BarIndex ()) - (numbars hts), r618I 0.05, 43) PlotText (78 WriteVal (r786, fração), LastValue ( BarIndex ()) - (numbars hts), r786I 0.05, 42) PlotText (100 WriteVal (p100, fração), LastValue (BarIndex ()) - (numbars hts), p100I 0.05, color100) PlotText (127 WriteVal (e 127, fração), LastValue (BarIndex ()) - (numbars hts), e127I 0.05, 47) PlotText (162 WriteVal (e162, fração), LastValue (BarIndex ()) - (numbars hts), e162I 0.05, 47) PlotText (200 WriteVal (e200, fração), LastValue (BarIndex ()) - (numbars hts), e200I 0.05, 47) PlotText (262 WriteVal (e262, fração), LastValue (BarIndex ()) - (numbars hts), e262I 0.05 47) PlotText (424 WriteVal (e424, fração), LastValue (BarIndex ()) - (numbars hts), e424I 0.05, 25) SECTIONEND () Código para identificar automaticamente pivôs - qual será o nosso alcance de lookback para o hh e (N. °) (Nome do nome () (StrLeft (FullName (), 15)) O: Abrir, H: Alto, L: Baixo, C: Fechar - Plote o gráfico básico de velas PlotOHLC (Open, High, Low, Close, n OO nH H nL L

Comments

Popular Posts