Tuesday 28 November 2017

Bhs Trading System


SECTIONBEGIN (quotBuySell-nodllquot) -------------------------------------------- ----------------------------- SetChartOptions (0, chartShowArrowschartShowDates) N (Título StrFormat (quot Open g, Hi g, Lo g, (G) Graph0BHSda Graph0Style24 Graph0BarColorIIf (BHSdagt0,5,4) GraphXSpace5 SetChartOptions (0, chartShowArrowschartShowDates) Plot (C, quotClosequot, ParamColor (quotColorquot, colorBlack), styleNoTitle styleCandle) Plot (O, quotOpenquot, ParamColor (quotColorquot, colorBlack), styleNoDraw) Plot ( H, quotHighquot, ParamColor (quotColorquot, colorBlack), styleNoDraw) Lote (L, quotLowquot, ParamColor (quotColorquot, colorBlack), styleNoDraw) BSAU EMA (Max (C - Ref (C, -1), 0). BHEXPerc) BSAC EMA (Max (Ref (C, -1) - C, 0), BHEXPerc) x1 (BHSMPPer-1) ((BSAC Value1) (100-Value1) - BSAU) BSR1 IIf (x1 gt 0, C x1, C x1 ( 100-Value1) Value1) x2 (BHSMPPer-1) ((BSAC Value1) (100-Value2) - BSAU ) BSR2 IIf (x2 gt 0, C x2, C x2 (100-Value2) Valor2) Lote (BSR1, quotquot, colorOrange, styleDashed) Lote (BSR2, quotquot, colorPaleBlue, styleDashed) r1 12Param (quotFast avgquot, 12, 2, 200, 1) r2 26Param (quotSlow avgquot, 26, 2, 200, 1) r3 9Param (quotSignal avgquot, 9, 2, 200, 1) Z 1Param (quotzigquot, 1,0,10,0.1) Cond1 Cross (MACD ( R1, r2), Sinal (r1, r2, r3)) Cond3 Zig (C, z) gtRef (Zig (C, z), - 4) Comprar Cond1 AND Cond3 Cond4 Cross (Sinal (r1, r2, r3), MACD (R1, r2)) Cond6 Zig (C, z) ltRef (Zig (C, z), - 4) Vender Cond4 AND Cond6 Trigger WriteIf (Comprar, quotBuyquot, quotquot) WriteIf (Sell, quotSellquot, quotquot) BSG IIf (Comprar ColorParkGreen, IIf (Vender, colorDarkRed, colorDefault)) se ((Status (quotactionquot) actionExplore) OU (Status (quotactionquot) actionScan)) Filtrar Comprar OU Vender SetOption (quotNoDefaultColumnsquot, True) AddTextColumn (Name (), quotSymbolquot, 77, BSFG, BSG, 120) AddColumn (DateTime (), quotDatequot, formatDateTime , BSFG, BSG, 100) AddColumn (TimeNum (), quotTimequot, 1, BSFG, BSG, 100) AddColumn (Buy, quotBuyquot, 1, BSFG, BSG, 50) AddColumn (Sell, quotSellquot, 1, BSFG, BSG, 50 ) AddColumn (O, quotOpenquot, 1.2, BSFG, BSG, 100) AddColumn (H, quotHighquot, 1.2, BSFG, BSG, 100) AddColumn (L, quotLowquot, 1.2, BSFG, BSG, 100) AddColumn (C, quotClosequot, 1.2 , BSFG, BSG, 100) AddColumn (Ref (V, -1), quotP-Volquot, 1, BSFG, BSG, 100) AddColumn (V (Ref (V, -1) 100), Aumentar em Volquot, 1, BSFG , BSG, 100) forma (Compre shapeHollowUpTriangle) (Vender shapeHollowDownTriangle) PlotShapes (forma, IIf (Comprar, ColorBlue, ColorBlue), 0, IIf (Comprar, Baixo, Alto)) GraphXSpace 7 ---------- -------------------------------------------------- --------------------------------------------- C1320Param (quotfontsquot, 20 , 10,30,1) C142.1Param (quotleft-rightquot, 2.1,1.0,5.0,0.1) C1512Param (quotup-downquot, 12,1,20,1) Miny Status (quotaxisminyquot) Status Maxy (quotaxismaxyquot) status lvb ( Quotlastvisiblebarquot) fvb Status (quotfirstvisible barquot) Estado pxwidth (quotpxwidthquot) Estado pxheight (quotpxheightquot) GfxSetBkMode (transparent1) GfxSetOverlayMode (1) GfxSelectFont (quotTahomaquot, Estado (quotpxheightquot) C13) GfxSetTextAlign (6) GfxSetTextColor (ColorRGB (217217213)) GfxTextOut (Nome (), estado (quotpxwidthquot ) C14, Status (quotpxheightquot) C15) GfxSelectFont (quotpxheightquot) Status (quotpxheightquot) C130.4) GfxSetTextColor (ColorRGB (103,103,103)) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C130.45) GfxSetTextColor (colorWhite) GfxSelectFont (quotMS Sans Serifquot, 10, 500, Falso, Falso, 0) ---------------------------------------- -------------------------------------------------- ------ SetChartBkGradientFill (ParamColor (quotBgTopquot, colorDarkOliveGreen), ParamColor (quotBgBotomquot, colorDarkGrey)) pShowtradeLines ParamToggle (quotShow Trade Linesquot, quotNoYesquot, 1) VolminParam (quotVolume minimumquot, 50,0,10000000,50) VolmaxParam (quotVolume maxquot , 1000000,0,10000000,50) priceRLParam (quotP Arroz Range Minquot, 50,1,120000,1) priceRHParam (quotPrice Range Maxquot, 20000,1,120000,1) BSPeChMi-25Param (quotPercentage Change Min setquot, -25, -100, 100, 0.1) BSPeChMa25Param (quotPercentage Change Max Setbot, 25, -100, 100, 0.1) BSPerTkProfParam (quotTake Profit Percent Setquot, 0.6,0.3,30,0.1) BSPerStLosParam (quotStopLoss Percent Setquot, 0.25,0.2,5,0.1) BSPlRng (TimeNum () gt 90000 E TimeNum ( ) Lt 153000) E (DateNum () LastValue (DateNum ())) BSFHRg (TimeNum () gt 090000 E TimeNum () lt 093000) E (DateNum () LastValue (DateNum ())) BSFHPrc BSFHRg BSFHMrk BarsSince (BSFHRggt0) NumBars 36000 Interval (1) TimeFrameSet (inDaily) TOP Abrir PDH Ref (Alto, -1) PDL Ref (Baixo, -1) PDO Ref (Open, -1) PDC Ref (Close, -1) PDM (PDHPDL) 2 TimeFrameRestore () IsAll True isRth TimeNum () gt 085400 E TimeNum () lt 093000 isdRth TimeNum () gt 085400 E TimeNum () lt 160000 aRthL IIf (isRth, L, 1000000) aRthH IIf (isdRth, H, Null) aRthLd IIf (isdRth, H, Null) aRthLd IIf (isdRth , L, 1000000) TOP TimeFrameExpand (TOP, inDaily, expandFi Primeiro lugar) PDH TimeFrameExpand (PDH, inDaily, expandFirst) PDL TimeFrameExpand (PDL, inDaily, expandFirst) PDO TimeFrameExpand (PDO, inDaily, expandFirst) PDC TimeFrameExpand (PDC, inDaily, expandFirst) PDM TimeFrameExpand (PDM, inDaily, expandFirst) FHH Ref ( HHV (HighBSFHRg, NumBars), - BSFHMrk) FHL TimeFrameCompress (aRthL, inDaily, compressLow) FHL TimeFrameExpand (FHL, inDaily, expandFirst) DayH TimeFrameCompress (aRthH, inDaily, compressHigh) DayH TimeFrameExpand (DayH, inDaily, expandFirst) DayL TimeFrameCompress (aRthLd , InDaily, compressLow) DayL TimeFrameExpand (DayL, inDaily, expandFirst) AIIf ((FC4ltFC1PDH0.005), FC1,0) BIIf ((FC4ltFC2PDH0.005 E FC4gtFC1PDH0.005), FC2,0) ClIIf ((FC4ltFC3 E FC4gtFC2PDH0.005 ), FC3,0) AF (ABCl) HaC (OHLC) 4 HaO AMA (Ref (HaC, -1), 0,5) HaH Max (H, Max (HaC, HaO)) HaL Min (L, Min (HaC, HaO )) BG3HHV (LLV (HaL, 4) ATR (4), 8) BR3LLV (HHV (HaH, 4) - ATR (4), 8) co IIf (HacgtBG3, colorBlue, IIf (Hac lt BR3, colorRed, colorGrey50) ) BuyPrice (DayLAF) BSByTP1 (BuyPrice (BuyPr Gelo (BSPerTkProf100))) BSByTP2 (CgtBSByTP1) SellPrice (DayH-AF) BSSlTP1 (SellPrice - (SellPrice (BSPerTkProf100))) BSSlTP2 (CltBSSlTP1) BSPrCh (((C-TOP) TOP) 100) Vol (VgtVolmin E VltVolmax) Porcentagem (E BSPrChgtBSPeChMi BSPrChltBSPeChMa) prc (CgtpriceRL E CltpriceRH) BuyStop1 (BuyPrice - (BuyPrice (BSPerStLos100))) BuyStop2IIf ((BuyStop1ltSellPrice) E SellPriceltBuyPrice, SellPrice, BuyStop1) SellStop1 (SellPrice (SellPrice (BSPerStLos100))) SellStop2IIf ((SellStop1gtBuyPrice) E SellPriceltBuyPrice, BuyPrice, SellStop1) BuyStopIIf ((Compre e NÃO BSByTP2), BuyStop2, Null) BuyTPIIf (Compre E NÃO BuyStop, BSByTP2, Nulo) Bars BarsSince (TimeNum () gt 85400 E TimeNum () lt 092900) x0 BarCount-LastValue ( Barras) x1 BarCount-1 TOPLine LineArray (x0, LastValue (TOP), x1, LastValue (TOP), 0) PDHLine LineArray (x0, LastValue (PDH), x1, LastValue (PDH), 0) PDLLine LineArray (x0, LastValue (PDL), x1, LastValue (PDL), 0) PDCLine LineArray (x0, LastValue (PDC), x1, LastValue (PDC), 0) PDMLine LineArray (x0, LastValue (PDM), x1, LastValue (PDM), 0 ) FHH Line LineArray (x0, LastValue (FHH), x1, LastValue (FHH), 0) FHLLine LineArray (x0, LastValue (FHL), x1, LastValue (FHL), 0) BuyPricelineLineArray (x0, LastValue (BuyPrice), x1, L AstValue (BuyPrice), 0) BuyStoplineLineArray (x0, LastValue (BuyStop2), x1, La stValue (BuyStop2), 0) BuyTPlineLineArray (x0, LastValue (BSByTP1), x1, LastV alue (BSByTP1), 0) SellPricelineLineArray (x0, LastValue (SellPrice), x1, LastValue (SellPrice), 0) SellStoplineLineArray (x0, LastValue (SellStop2), x1, LastValue (SellStop2), 0) SellTPlineLineArray (x0, LastValue (BSSlTP1), x1, último valor (BSSlTP1), 0) DayHlineLineArray (x0, LastValue (DayH), x1, LastValue (DayH), 0) DayLlineLineArray (x0, LastValue (DayL), x1, LastValue (DayL), 0) Plot (IIf (pShowtradeLines, BuyStopline, Null), quotquot, colo RBrightGreen, styleDotsstyleNoRescale styleNoLine) Plot (IIf (pShowtradeLines, SellPriceline, Null), quotquot, co lorRed, styleDotsstyleNoRescale) if (Status (quotactionquot) actionIndicator) (Título EncodeColor (colorWhite) quotBuySell quot quot - quot Name () quot - quot Encode Cor (colorYellow) Intervalo (2) EncodeColor (colorYellow) quot - quot Date () quot - quot EncodeColor (colorYellow) quotOpen quotEncodeColor (colorWhite) WriteVal (O, 8.2) EncodeColor (colorYellow) quot, High quotEncodeColor (colorWhite) WriteVal (H , 8.2) EncodeColor (colorYellow) quot, Low quotEncodeColor (colorWhite) WriteVal (L, 8.2) EncodeColor (colorYellow) quot, Close quotEncodeColor (colorWhite) WriteVal (C, 8.2) EncodeColor (colorYellow) quot, Vol quotEncodeColor (colorWhite) WriteVal ( V, 1) (quotnquot)) ------------------------------------------ -------------------------------------------------- ------------------------- GfxSetOverlayMode (modo 0) GfxSelectPen (colorLightBlue, 2) GfxSelectSolidBrush (colorBlack) GfxRoundRect (5,65, 250, 180, 16, 20) GfxSetBkMode (1) GfxSelectFont (quotArialquot, 12, 700, False) GfxSetTextColor (colorBrown) GfxSetTextAlign (0) GfxSetTextColor (colorPaleGreen) GfxTextOut (WriteIf (BuyPrice, QuotLong Target 1: quotWriteVal (BuyPrice, 1.2), quotquot) 15, 73) G FxSetTextColor (colorLightBlue) GfxTextOut (WriteIf (BSByTP1. QuotLakeVict (SellPrice, 1.2), quotquot), 15, 111) GfxSetTextColor (colorRed) GfxSetTextColor (colorRed) GfxTextOut (WriteIf (SellPrice, QuotShort Target 1: quotWriteVal (BSByTP1,1.2), 15, 92) GfxSetTextColor (colorRed) GfxTextOut (WriteIf (BSSlTP1, quotShort Target 2: quotWriteVal (BSSlTP1,1.2), quotquot), 15, 129) GfxSetTextColor (colorWhite) GfxTextOut (WriteIf (BuyStopline, quotInstant SupRes: quotWriteVal (BuyStopline, 1.2), quotquot), 15, 147 ) BuyCross (j, nw) ShortCross (nw, j) SellCross (nw, j) CoverCross (j, nw) BuyExRem (Comprar, Vender) SellExRem (Sell, Buy) ShortExRem (Short, Cover) CoverExRem (Cover, Short) LongFlip (Comprar, Vender) ShrtFlip (Vender, Comprar) dist 1.5ATR (15) Buy2show0 Sell2show0 para (i 0 i lt BarCount i) se (Buyi) PlotText (quotBuyquot WriteVal (C i, 1.2), i-5, C i - Trendi, colorWhite, colorBlue) Buy2showCi se (Selli) PlotText (quotSellquot WriteVal (C i, 1), i-5, C i Trendi, colorWhite, colorRed) Sell2showC i AlertIf (Sell, quotSOUND C: WindowsMediaDing. wavquot, quotSellquot WriteVal ( H, 1.2), 2) AlertIf (Comprar, quotSOUND C: WindowsMediaDing. wavquot, quotBuyquot WriteVal (O, 1.2), 1) GfxSetBkMode (transparente1) GfxSetOverlayMode (1) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C13) GfxSetTextAlign (6) GfxSetTextColor ( (GkxTextOut) (Nome (), Status (quotpxwidthquot) C14, Status (quotpxheightquot) C15) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C130.4) GfxSetTextColor (ColorRGB (103,103,103)) GfxTextOut (quotFromquot, Status (quotpxwidthquot) C141.8, Status (quotpxheightquot) C1510.5) GfxSelectFont (quotpxheightquot) Status (quotpxheightquot) C130.45) GfxSetTextColor (colorWhite) GfxTextOut (quot buysellnifty quot, Status (quotpxwidthquot) C141.8, Status (quotpxheightquot) C1511) GfxSelectFont ( QuotMS Sans Serifquot, 10, 500, False, False, 0) --------------------------- para traçar o preço Buysell GfxSetOverlayMode (modo 0) GfxSelectPen (colorGreen, 2) GfxSelectSolidBrush (colorBlack) GfxRoundRect (5, 181,250,240, 15, 15) GfxSetBkMode (1) GfxSelectFont (QuotArialquot, 12, 700, False) GfxSetTextColor (colorPaleGreen) GfxSetTextAlign (0) GfxTextOut (WriteIf (Buy OR Long. QuotBUY Signal No quotWriteVal (Buy2show, 1.2), quotquot), 10, 185) GfxTextOut (WriteIf (Sell OU SHT. QUOTSELL Sinal Ao quotWriteVal (Sell2show, 1.2), quotquot), 10, 185) GfxSetTextColor (colorYellow) GfxTextOut (WriteIf ( Long AND NOT Buy, quotBUY Profit quotWriteVal (C-Buy2show, 1.2), quotquot), 10, 205) GfxTextOut (WriteIf (shrt AND NOT Sell, quotSELL Profit quotWriteVal (Sell2show-C, 1.2), quotquot), 10, 205) GfxSelectPen (colorOrange, 2) GfxSelectSolidBrush (colorBlack) GfxRoundRect (5,20, 250,63, 16, 16, GfxSelectOut (WriteIf) (LongO ou DHT. QuotCMP quotWriteVal (C, 1.2), quotquot), 10, 215) GfxSetOverlayMode (modo 0) 20) GfxSetBkMode (1) GfxSelectFont (quotArialquot, 12, 700, False) GfxSetTextColor (colorPaleGreen) GfxSetTextAlign (0) GfxSetTextColor (colorYellow) GfxTextOut (WriteIf (SellPrice, quotTREND REVERSAL: quot (SellPrice), quotquot), 8, 25) GfxSetTextColor (ColorRed) GfxTextOut (WriteIf (nw, quot Trailing SL. QuotWriteVal (nw, 1), quotquot), 8, 43) GfxTextOut (WriteIf (Cover AND NOT Buy, qu O Trailing SL. QuotWriteVal (nw, 1), quotquot), 8, 43) GfxSetTextColor (colorGold) GfxTextOut (WriteIf (nw, quot Trailing SL. QuotWriteVal (nw, 1), quotquot), 8, 43) GfxTextOut (WriteIf (Short AND NOT Sell QuotWriteVal (nw, 1), 8, 43) PlotShapes (IIf (Comprar, shapeUpArrow, shapeNone), ColorWhite, 0, HAL, -40) PlotShapes (IIf (Curto, shapeDownArrow, shapeNone), ColorWhite, 0, HAH, -40) fibs ParamToggle (quotPlot Fibsquot, quotOffOnquot, 1) pctH 0.325Param (quotPivot Hi quot, 0.325,0.001,2.0,0.002) HiLB 1Param (quotUp LookBackquot, 1,1, BarCount-1,1 ) PctL 0.325Param (quotPivot Lo quot, 0.325,0.001,2.0,0.002) LoLB 1Param (quotDown LookBackquot, 1,1, BarCount-1,1) Voltar 1Param (quotExtend Left 2quot, 1,1,500,1) Fwd 0Param (quotPlot Forwardquot, 0, 0, 500, 1) texto ParamToggle (quotPlayer Textquot, quotOffOnquot, 1) hts -14Param (quotText Shiftquot, -14, -50,50,0.10) estilo ParamStyle (quotLine Stylequot, styleLine, styleNoLabel) x BarIndex ( ) PRp PeakBars (H, pctH, 1) 0 yRp0 LastValue (ValueWhen (pRp, H, H ILB)) xRp0 LastValue (ValueWhen (pRp, x, HiLB)) pSp TroughBars (L, pctL, 1) 0 ySp0 LastValue (ValueWhen (pSp, L, LoLB)) xSp0 LastValue (ValueWhen (pSp, x, LoLB)) Delta YRp0 - função ySp0 LFI (ret) retval (Delta ret) LFIVal 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)))) retorna LFIVal xoMin (xSp0, xRp0) - Back x1BarCount-1 r236 LFI (0.236) r236I LastValue (r236,1) r382 LFI (0,382) r382I LastValue (r382,1) r050 LFI (0.50) r050I LastValue (r050,1) r618 LFI (0.618) r618I LastValue (r618,1) r786 LFI (0.786) r786I LastValue (r786,1) e127 LFI (1.27 ) E127I LastValue (e127,1) e162 LFI (1.62) e162I LastValue (e162,1) e200 LFI (2.00) e200I LastValue (e200,1) e262 LFI (2.62) e262I LastValue (e262,1) e424 LFI (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 (quotbarvisiblequot))) fração IIf (StrRight (Name (), 3) Quotquot 3.2, 3.2) se (texto1) PlotText (quot 0 quot WriteVal (p00,1), LastValue (BarIndex ()) - (numbarshts), p00I 0.05, color00) PlotText (quot23 quot WriteVal (r236,1), LastValue (BarIndex ()) - (numbarshts), r382I 0.05, color00) PlotText (quot50 quot WriteVal (r050, r002,1), Last. fm 1), LastValue (BarIndex ()) - (numbarshts), r050I 0.05, color00) PlotText (quot62 quot WriteVal (r618,1), LastValue (BarIndex ()) - (numbarshts), r618I 0.05, color00) PlotText (quot78 quot WriteVal (r786,1), LastValue (BarIndex ()) - (numbarshts), r786I 0.05, color00) PlotText (quot100 quot WriteVal (p100,1), LastValue (BarIndex ()) - (numbarshts), p100I 0.05, color00) PlotText (quot127 quot WriteVal (e127,1), LastValue (BarIndex ()) - (numbarshts), e1 27I 0.05, color00) PlotText (quot162 quot WriteVal (e162,1), LastValue (BarIndex ()) - (numbarshts), e162I 0.05, color00) PlotText (quot200 quot WriteVal (e200,1), LastValue (BarIndex ()) - (Numbarshts), e200I 0.05, color00) PlotText (quot262 quot WriteVal (e262,1), LastValue (BarIndex ()) - (numbarshts), e262I 0.05, color00) PlotText (quot424 quot WriteVal (e424,1), LastValue (BarIndex (), (Numbarshts), e424I 0.05, color00) YH TimeFrameGetPrice (quotHquot, inDaily, -1) yesterdays high YL TimeFrameGetPrice (quotLuot, inDaily, -1) low YC TimeFrameGetPrice (quotCquot, inDaily, -1) close YO TimeFrameGetPrice ( QuotOquot inDaily) dia atual aberto Pivô normal PP (YH YL YC) 3 R1 (2 PP) - YL R2 PP (YH - YL) R3 YH 2 (PP-YL) S1 (2 PP) - YH S2 PP - (YH - YL) S3 YL - 2 (YH - PP) -------------------------------------- --------------------------------------------- SECTIONEND () SECTIONBEGIN ( QuotBuySell Trendquot) Comprar ou Vender Condição Comprar Cruz (EMA (Close. 3), EMA (Close 23)) Sell Cross (EMA (Close. 23), EMA (Close. 3)) Plot EMA Plot (EMA (Close, 23), quot23 EMAquot, ParamColor (quotColorquot, colorBlack), styleNoRescale) Plot (EMA (Close, 3), QUAT3 EMAquot, ParamColor (quotColorquot, colorBlack), styleNoRescale) Plot Ribbon Ribbon1IIf (EMA (Close. 3) gtEMA (Close. 23), colorGreen, IIf (EMA (Close. 23) gtEMA ( Fechar 3), ColorRed, colorYellow)) Plot (3, quotRibbonquot, Ribbon1, styleOwnScale styleArea styleNoLabel, -0,5,100) SECTIONEND () uptCgtMA (C, 21) E CgtEMA (C, 8) dntCltMA (C, 21) E CltEMA (C, 8) porca (CltMA (C, 21) E CgtEMA (C, 8)) OU (CgtMA (C, 21) E CltEMA (C, 8)) ColIIf (dnt, colorRed, IIf (upt, colorBlueGrey, IIf (porca, colorYellow, colorTan))) Plot (C, quotClosequot, col, styleNoTitle ParamStyle (quotStylequot) GetPriceStyle ()) Filter1 AddColumn (C, quotclosequot, 1.2,1, Col) Novos sistemas de bhs vendem vendidos. Abaixo está afl semelhante Para cima, do qual eu havia copiado - talvez apenas este fórum: SECTIONBEGIN (quotMA Diffquot) T26 KMA ((C-MA (C, T)) MA (C, T)) 1 00 Graph0KMA Graph0Style24 Graph0BarColorIIf (KMAgt0,5,4) GraphXSpace5 SECTIONBEGIN (quotPricequot) SetChartOptions (0, chartShowArrowschartShowDates) Plot (C, quotClosequot, ParamColor (quotColorquot, colorBlack), styleNoTitle ParamStyle (quotStylequot) GetPriceStyle ()) SECTIONEND () SECTIONBEGIN (quotZIG - ZAGquot) P ParamField (quotPrice fieldquot) alterar Param (quot changequot, 5,0.1,25,0.1) SECTIONEND () SECTIONBEGIN (quotEMAquot) P ParamField (quotPrice fieldquot, -1) Períodos Param (quotPeriodsquot, 15, 2, 300, 1, 10) SECTIONEND () SECTIONBEGIN (quotMACD Explorationquot) r1 Param (quotFast avgquot, 12, 2, 200, 1) r2 Param (quotSlow avgquot, 26, 2, 200, 1) r3 Param (quotSignal avgquot, 9, 2, 200, 1) ZParam (quotzigquot, 1,0,10,0.1) Cond3 Zig (C, z) gtRef (Zig (C, z), - 4) Comprar Cond1 AND Cond3 Cond6 Zig (C, z) ltRef (Zig ( C, z), - 4) Vender Cond4 AND Cond6 Trigger WriteIf (Comprar, quotBuyquot, quotquot) WriteIf (Vender, quotSellquot, quotquot) BG IIf (Comprar, colorPaleGreen, IIf (Vender, colorRose, colorDefault) ) FG IIf (Comprar, colorDarkGreen, IIf (Vender, colorDarkRed, colorDefault)) se (Status (quotactionquot) actionIndicator) Plot (C, quotquot, colorGrey50, styleBar) PlotShapes (IIf (Buy, shapeUpArrow, shapeNone), colorWhite, 0, L, Offset-30) PlotShapes (IIf (Vender, shapeDownArrow, shapeNone), colorWhite, 0, H, Offset-30) Filtrar Comprar ou vender SetOption (quotNoDefaultColumnsquot, True) AddTextColumn (Name (), quotSymbolquot, 77, FG, BG , 120) AddColumn (DateTime (), quotDatequot, formatDateTime, FG, BG, 100) AddColumn (TimeNum (), quotTimequot, 1) AddColumn (C, quotClosequot, 1.3) AddColumn (H, quotHighquot, 1.3) AddColumn (V, quotVolumequot ) AddColumn (Ref (V, -1), quotP-Volquot) AddColumn (VRef (V, -1) 100, QuotIncrease in Volquot) AddColumn (Buy, quotBuyquot, 1) AddColumn (Sell, quotSellquot, 1) shape Comprar shapeHollowUpTriangle Sell ShapeHollowDownTriangle PlotShapes (forma, IIf (Comprar, colorBlue, colorBlue), 0, IIf (Comprar, Baixo, Alto)) GraphXSpace 7 SECTIONEND () SECTIONBEGIN (quotEMA3quot) P ParamField (quotPrice fie Ldquot, -1) Períodos Param (queriodsquot, 15, 2, 300, 1, 10) SECTIONEND () SECTIONBEGIN (quotBackground textquot) C13Param (quotfontsquot, 20,10,30,1) C14Param (quotleft-rightquot, 2.1,1.0, 5.0.0.1) C15Param (quotup-downquot, 12,1,20,1) Miny Status (quotaxisminyquot) Status Maxy (quotaxismaxyquot) lvb Status (quotlastvisiblebarquot) fvb Status (quotfirstvisiblebarquot) pxwidth Status (quotpxwidthquot) pxheight Status (quotpxheightquot) GfxSetBkMode ( Transparente1) GfxSetOverlayMode (1) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C13) GfxSetTextAlign (6) GfxSetTextColor (ColorRGB (217,217,213)) GfxTextOut (Nome (), Status (quotpxwidthquot) C14, Status (quotpxheightquot) C15) GfxSelectFont (quotTahomaquot, Status (Quotpxheightquot) C130.5) GfxSetTextColor (ColorRGB (103,103,103)) GfxTextOut (quotquot, Status (quotpxwidthquot) C14, Status (quotpxheightquot) C152.5) ​​GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C130.5) GfxSetTextColor (ColorRGB (103,103,103) ) GfxTextOut (quot quot, St Cf. , colorLightYellow)) SetChartBkColor (ParamColor (quotBackGround Colorquot, colorBlack)) pShowtradeLines ParamToggle (quotShow Comércio Linesquot, quotNoYesquot, 1) pShowMarkers ParamToggle (quotShow Markersquot, quotNoYesquot, 1) buyshort synchParamToggle (quotSynchronize com indexquot estrangeira, quotNoYesquot, 1) VolminParam (quotVolume Mínimo, 5000,0,10000000,50) VolmaxParam (quotVolume maximumquot, 1000000,0,10000000,50) priceRLParam (quotPrice Range Minquot, 150,1,20000,1) priceRHParam (quotPrice Range Maxquot, 3000,1,20000,1 ) PercChangeminParam (quotPercentage Change Min setquot, -25, -100, 100, 0.1) PercChangemaxParam (quotPercentage Change Max setquot, 25, -100, 100, 0.1) PerctakeProfitParam (quotTituário de lucro Percentual Setquot, 0.5,0.3,30,0.1) PercStoploss Param (quotStopLoss Percent Setquot, 1,0.2,5,0.1) PlotOHLC (Open, High, Low, Close, quotquot, colorWhite, styleCa ndle) Barras 0 xpdh 90 PlotRange (TimeNum () gt 85500 E TimeNum () lt 153500) E (DateNum () LastValue (DateNum ())) FHRange (TimeNum () gt 085500 E TimeNum () lt 093000) E (DateNum () LastValue (DateNum ())) FHPrices FHRange FHMarker BarsSince (FHRangegt0) NumBars 36000 Interval (1 ) TimeFrameSet (inDaily) TOP Abrir PDH Ref (Alto, -1) PDL Ref (Baixo, -1) PDO Ref (Open, -1) PDC Ref (Close, -1) PDM (PDHPDL) 2 TimeFrameRestore () isAll True isRth TimeNum () gt 085400 E TimeNum () lt 093000 isdRth TimeNum () gt 085400 E TimeNum () lt 160000 aRthL IIf (isRth, L, 1000000) aRthH IIf (isdRth, H, Null) aRthLd IIf (isdRth, L, 1000000) (PDD, inDaily, expandFirst) PDO TimeFrameExpand InDaily, e XpandFirst) FHH Ref (HHV (HighFHRange, NumBars), - FHMarker) FHL TimeFrameCompress (aRthL, inDaily, compressLow) FHL TimeFrameExpand (FHL, inDaily, expandFirst) DayH TimeFrameCompress (aRthH, inDaily, compressHigh) DayH TimeFrameExpand (DayH, inDaily, expandFirst ) DayL TimeFrameCompress (aRthLd, inDaily, compressLow) DayL TimeFrameExpand (DayL, inDaily, expandFirst) AIIf ((FC4ltFC1PDH0.005), FC1,0) BIIf ((FC4ltFC2PDH0.005 E FC4gtFC1PDH0.005), FC2,0) ClIIf (( FC4ltFC3 E FC4gtFC2PDH0.005), FC3,0) AF (ABCl) Foreign SECTIONBEGIN (quotforeign Index bar graphquot) VrParamList (quotIndexquot, List quotNSEI, NSEBANK, CNXIT, NSMIDCP, RELIANCE. NS, SB IN. N Squot, 0) SetForeign ( VR) HaC (OHLC) 4 HaO AMA (Ref (HaC, -1), 0,5) HaH Max (H, Max (HaC, HaO)) HaL Min (L, Min (HaC, HaO)) BG3HHV (LLV (HaL, 4) ATR (4), 8) BR3LLV (HHV (HaH, 4) - ATR (4), 8) co IIf (HacgtBG3, colorBrightGreen, IIf (Hac lt BR3, colorRed, colorGrey50)) Plot (4, quotquot, Co , StyleAreastyleOwnScale styleNoLabel, -1, 100) RestorePriceArrays () SE CTPEND () BuyPrice (DayLAF) BuyTP1 (BuyPrice (BuyPrice (PerctakeProfit100))) BuyTP2 (CgtBuyTP1) SellPrice (DayH-AF) SellTP1 (SellPrice - (SellPrice (PerctakeProfit100))) SellTP2 (CltSellTP1) percchange (((C-TOP) TOP) (VgtVolmin AND VltVolmax) Percentagem (percchangegtPercChangemin AND percchangeltPercChangemax) prc (CgtpriceRL AND CltpriceRH) BuyStop1 (BuyPrice - (BuyPrice (PercStoploss100))) BuyStop2IIf ((BuyStop1ltSellPrice) E SellPriceltBuyPrice, SellPrice, BuyStop1) SellStop1 (SellPrice (SellPrice (PercStoploss100)) SellStop2IIf ((SellStop1gtBuyPrice) E SellPriceltBuyPrice, BuyPrice, SellStop1) BuyStopIIf ((Buy AND NOT BuyTP2), BuyStop2, Null) BuyTPIIf (Compre E NÃO BuyStop, BuyTP2, Null) Barras BarsSince (TimeNum () gt 85400 AND (X0, LastValue (TOP), 0) PDHLine LineArray PDH), 0) PDLLine LineArray (x0, LastValue (PDL), x1, LastValue (PDL), 0) PDCLine LineArray (x0, LastValue (PDC), x1, La StValue (PDC), 0) PDMLine LineArray (x0, LastValue (PDM), x1, LastValue (PDM), 0) FHHLine LineArray (x0, LastValue (FHH), x1, LastValue (FHH), 0) FHLLine LineArray (x0, LastValue (FHL), x1, LastValue (FHL), 0) BuyPricelineLineArray (x0, LastValue (BuyPrice), x1, L astValue (BuyPrice), 0) BuyStoplineLineArray (x0, LastValue (BuyStop2), x1, La stValue (BuyStop2), 0) BuyTPlineLineArray (x0, LastValue (BuyTP1), x1, LastVa lue (BuyTP1), 0) SellPricelineLineArray (x0, LastValue (SellPrice), x1, LastValue (SellPrice), 0) SellStoplineLineArray (x0, LastValue (SellStop2), x1, LastValue (SellStop2), 0) SellTPlineLineArray (x0, LastValue (SellTP1), x1, último valor (SellTP1), 0) DayHlineLineArray (x0, LastValue (DayH), x1, LastValue (DayH), 0) DayLlineLineArray (x0, LastValue ( DayL), x1, LastValue (DayL), 0) Plot (IIf (pShowtradeLines, BuyStopline, Null), quotBuySto pquot, colorBrightGreen, styleDotsstyleNoRescale styleNoLine) Plot (IIf (pShowtradeLines, SellPriceline, Null), QuotShor t Herequot, colorRed, styleDotsstyleNoRescale) PlotShapes (IIf (pShowMarkers AND Buy, shapeHollowUpAr Linha, Nulo), colorDarkGreen, 0, L, Offset-30) se (Status (quotactionquot) actionIndicator) (Título EncodeColor (colorWhite) quotBHS2 Systemquot quot - quot Nome () quot - quode EncodeColor (colorYellow) Intervalo (2) EncodeColor ( Color-amar) quot - quot Date () quot - quot EncodeColor (colorYellow) quot-OpenquotWriteVal (O, 1) EncodeColor (colorYellow) quot - High quot WriteVal (H, 1) EncodeColor (colorYellow) quot - Close quot WriteVal (C, 1 ) EncodeColor (colorYellow) quot - Vol quot WriteVal (V, 1) WriteIf (Percchange, quot Change quot (Percchange) quot quot quotquot) quotquot quot Previous DayHighquotWriteVal (PDH, 1) quot, DayLowquotWriteVal anterior (PDL, 1) Quot, quaqVotalQualidadeQualquoteVal (DayL, 1) Comm2 (quotn quotVrquot Phase: quot) WriteIf (HacgtBG3, EncodeColor (colorBrightGreen) quotUp quot, WriteIf (HacltBR3, EncodeColor (colorRed) quot-Downquot, EncodeColor (CorLightYellow) quotlt Flat gtquot))) GfxSetOverlayMode (modo 0) GfxSelectPen (colorLightBlue, 3) GfxSelectS OlfBrush (corLightYellow) GfxRoundRect (20, 55, 180, 175, 15, 15) GfxSetBkMode (1) GfxSelectFont (quotArialquot, 10, 700, False) GfxSetTextColor (colorBrown) GfxSetTextAlign (0) GfxTextOut (WriteIf (Buystop2, quotTRP level: quot (Buystop2), quotquot), 30, 60) GfxTextOut (WriteIf (BuyPrice, quotBuy Above: quot (BuyPrice), quotquot), 30, 75) GfxTextOut (WriteIf (BuyStop2, quotLong SL: quot (BuyStop2), quotquot), 30 , 90) GfxTextOut (WriteIf (BuyTP1. QuotLong Target 1: quot (BuyTP1), quotquot), 30, 105) GfxTextOut (WriteIf (SellPrice, quotSell Below: quot (SellPrice), quotquot), 30, 120) GfxTextOut (WriteIf (SellStop2, quotShort SL: quot (SellStop2) ), 30, 135) GfxTextOut (WriteIf (SellTP1, quotShort Target: quot (SellTP1), quotquot), 30, 150) AddColumn (V, quotVolumequot, 1.0) AddColumn (Percchange, quotChange quot, 1.2) AddColumn (BuyPrice, CompreColumn (SellPrice, quotShort atquot, 1.2) AddColumn (SellTP1, quotShort earn atquot, 1.2) SECTIONBEGIN (quotshort signalquot) HaClose (BuyPlay, quotBuy Stop atquot, 1.2) AddColumn (BuyTP1, quotBuy Ganat atquot, 1.2) (OH), Max (HaClose, HaOpen)) HaLow Min (L, Min (HaClose, HaOpen)) BG2HHV (LLV (Baixo, 4) ATR (OH, Max) (4) - ATR (4), 8) SetBarFillColor (IIf (O ltC, colorSeaGreen, colorOrange)) k Otimizar (quotKquot, Param (quotKquot, 1,75,1,5,0.25) ), 1,5,0.25) Per Optimize (quotatrquot, Param (quotatrquot, 10, 3, 30, 1), 3,30,1) jHaClo Se nm (HL) rfsctor WMA (nm, PER) reversão K rfsctor Tendência 1 NW0 0 para (i 1 i lt BarCount i) se (Trendi-1 1) se (ji lt NWi-1) Trendi -1 NWi ji Reversi mais Trendi 1 se ((ji - Reversi) gt NWi-1) NWi ji - Reversi mais NWi NWi-1 se (Trendi-1 -1) se (ji gt NWi-1) Trendi 1 NWi ji - Reversi mais Trendi -1 se ((Ji Reversi) lt NWi-1) NWi ji Reversi mais NWi NWi-1 Plot (NW, quotquot, IIf (Tendência 1, 6, 4), 4) BuyCross (j, nw) ShortCross (nw, j) SellCross ( Nw, j) CoverCross (j, nw) BuyExRem (Comprar, Vender) SellExRem (Sell, Buy) ShortExRem (Short, Cover) CoverExRem (Cover, Short) PlotShapes (IIf (Comprar, shapeUpArrow, shapeNone), ColorWhite, 0, halow -30) PlotShapes (IIf (Vender, shapeHollowDownTriangle, shapeNone), colorWhite, 0, hahigh, -15) PlotShapes (IIf (Cover, shapeHollowUpTriangle, shapeNone), ColorWhite, 0, halow, -15) PlotShapes (IIf (Short, ShapeDownArrow, shapeNone), colorWhite, 0, hahigh, -30) ----------- final -------------- PADRÕES ADICIONADOS LINHAS MAIS TARDE ---- pontos de pivô DayH TimeFrameGetPrice (quotHquot, inDaily, -1) ontem alta DayL TimeFrameGetPrice (quotLuot, inDaily, -1) low DayC TimeFrameGetPrice (quotCquot, inDaily, -1) close DayO TimeFrameGetPrice (quotOquot, inDaily) dia atual aberto HiDay TimeFrameGetPrice (quotHquot, inDaily) LoDay TimeFrameGetPrice (quotLquot, inDaily ) PP (DayH DayL DayO DayO) 4 R1 (2 PP) - DayL S1 (2 PP) - DayH R2 PP R1 - S1 S2 PP S1 - R1 R3 R2 (R1 - PP) S3 S2 - (PP - S1) style styleLine StyleThick styleNoRescale rcolor colorBlue scolor colorRed pcolor colorir Plot (R1, quotR1quot, rcolor, estilo) Plot (S1, quotS1quot, scolor, style) Lote (R2, quotR2quot, rcolor, estilo) Lote (S2, quotS2quot, scolor, style) Lote PPPQ, quotPPot, pcolor, estilo) Plot (s3, quotS3quot, scolor, style) Plot (R3, quotR3quot, rcolor, estilo) RangeTitle EncodeColor (colorWhite) quotDay Range quot EncodeColor (colorWhite) Cor de fundo SetChartBkColor (ParamColor (quotPanel color quot, ColorPaleBlue)) TicDiv Param (quotTic ou PIP valuequot, 1,0,1000000) Titledisplay ParamToggle (quotD Isplay pivot statsquot, quotNoYesquot, 1) barcolor IIf (C gt Open, colorWhite, IIf (C Open, colorWhite, colorWhite)) Plot (C, quotClosequot, barcolor, styleCandle styleNoLabel) EMA34 EMA (C, 34) LSMA LinearReg (C, 25) PI atan (1,00) 4 períodos 30 HighHigh HHV (H, períodos) LowLow LLV (L, períodos) intervalo 25 (HighHigh - LowLow) LowLow x1EMA34 0 x2EMA34 2 y1EMA34 0 y2EMA34 (Ref (EMA34, -2) - EMA34) Gama média cEMA34 sqrt ((x2EMA34 - x1EMA34) (x2EMA34 - x1EMA34) (y2EMA34 - y1EMA34) (y2EMA34 - y1EMA34)) angleEMA34 rodada (180 acos ((x2EMA34 - x1EMA34) cEMA34) PI) TítuloAngleEMA34 EncodeColor (colorWhite) quotnEMA34 ângulo quot angleEMA34 IIf (y2EMA34 gt 0, - angleEMA34, angleEMA34) ColorANGLEEMA IIf (angleEMA34 gt5, colorTurquoise, IIf (angleEMA34 lt5 E angleEMA34 gt3.57, colorDarkGreen, IIf (angleEMA34 lt3.57 E angleEMA34 gt2.14, colorPaleGreen, IIf (angleEMA34 lt2. 14 E angleEMA34 gt.71, colorLime, IIf (angleEMA34 lt-15, colorDarkRed, IIf (angleEMA34 gt-15 E angleEMA34 lt-13.57, colorRed, IIf (angleEMA34 gt-13.57 AND angleEMA34 lt-12.14,colorOrange, IIf(angleEMA34 gt-12.14 AND angleEMA34 lt-1.71,colorLightOrange, colorYellow)))))))) Plot(EMA34,quotEMA 34quot, ColorANGLEEMA, styleLine styleThick styleNoLabel ) Plot(lsma, quotLSMA 25quot, IIf(C gt lsma, colorBrightGreen, IIf(C lsma, colorTeal, colorRed)), styleLine styleThick styleNoLabel) Hld IIf(C gt Ref(MA(H, 7), -1), 1, IIf(C lt Ref(MA(L, 7), -1), -1, 0)) Hlv ValueWhen(Hld 0, Hld, 1) Hilo IIf(Hlv -1, MA(H, 7), MA(L, 7)) Trigger IIf(CgtHilo, colorBlue, colorPink) Plot(Hilo, quotHiLoquot, Trigger, styleStaircase) Title EncodeColor(colorWhite) Name() quot - quot EncodeColor(colorRed) Interval(2) EncodeColor(colorTan) quot - quot Date() quot - quotquotOp-quotOquot quotquotHi-quotHquot quotquotLo-quotLquot quot quotCl-quotCquot quot quotnquot quotVol quot WriteVal(V)quot, Today HighquotWriteVal(DayH,2)quot, Todays LowquotWriteVal(DayL,2)

No comments:

Post a Comment