Wednesday 23 August 2017

Bhs Trading System


Novos sistemas de compra comprar vender nifty Abaixo está afl semelhante ao acima, do qual eu tinha copiado - talvez este fórum apenas: SECTIONBEGIN (quotMA Diffquot) T26 KMA ((C-MA (C, T)) / MA (C, T)) 100 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 (quotPrix 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 (Comprar, shapeUpArrow, shapeNone), ColorWhite, 0, L, Offset-30) PlotShapes (IIf (Sell, 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 (V / Ref (V, -1) 100, QuotIncrease in Volquot) AddColumn (Buy, quotBuyquot, 1) AddColumn (Sell, quotSellquot, 1) shape Compre shapeHollowUpTriangle Sell shapeHollo WDownTriangle PlotShapes (shape, IIf (Comprar, colorBlue, colorBlue), 0, IIf (Comprar, Baixo, Alto)) GraphXSpace 7 SECTIONEND () SECTIONBEGIN (quotEMA3quot) P ParamField (quotPrice fieldquot, -1) Períodos Param (quotPeriodsquot, 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 ( Quais são as seguintes: GfxSetTextColor (ColorRGB (217,217,213)) GfxTextOut (Name (), Status (quotpxwidthquot) / C14, Status (quotpxheightquot) / C15) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) /C130.5) GfxSetTextColor (ColorRGB (103,103,103)) GfxTextOut (quotquot, Status (quo Tpxwidthquot) / C14, Status (quotpxheightquot) /C152.5) ​​GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) /C130.5) GfxSetTextColor (ColorRGB (103,103,103)) GfxTextOut (quot quot, Status (quotpxwidthquot) / C14, Status (quotpxheightquot) / C154) GfxSelectFont (quotMS Sans Serifquot, 10, 500, False, False, 0) // A segunda fase começa aqui // Arquivo: BHS Chart SECTIONBEGIN (quotBHS1.02quot) SetChartBkColor (ParamColor (quotOuter tamanho do painel quot, colorLightYellow)) SetChartBkColor (ParamColor (quotBackGround Colorquot, colorBlack)) pShowtradeLines ParamToggle (quotShow Trade Linesquot, quotNoYesquot, 1) pShowMarkers ParamToggle (quotShow Markersquot, quotNoYesquot, 1) synchParamToggle (quotSynchronize buy / short with foreign indexquot, quotNoYesquot, 1) VolminParam (quotVolume minimumquot, 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 Chang E Min setquot, -25, -100, 100, 0.1) PercChangemaxParam (quotPercentage Change Max setquot, 25, -100, 100, 0.1) PerctakeProfitParam (quotTaber Percentagem de lucro Setquot, 0.5,0.3,30,0.1) PercStoplossParam (quotStopLoss Percent Set Set 1,02,5,0.1) PlotOHLC (Open, High, Low, Close, quotquot, colorWhite, styleCa ndle) Bares 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 High FHRange FHMarker BarsSince (FHRangegt0) NumBars 36000 / Interval (1) TimeFrameSet (inDaily ) TOP Abrir PDH Ref (Alto, -1) PDL Ref (Baixo, -1) PDO Ref (Abrir, -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) TOP TimeFrameExpand ( TOP, inDaily, expandFirst) PDH TimeFrameExpand (PDH, i NDaily, expandFirst) PDL TimeFrameExpand (PDL, inDaily, expandFirst) PDO TimeFrameExpand (PDO, inDaily, expandFirst) PDC TimeFrameExpand (PDC, inDaily, expandFirst) PDM TimeFrameExpand (PDM, inDaily, expandFirst) 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) // estrangeiro 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 () SECTIONEND () BuyPrice (DayLAF) BuyTP1 (BuyPrice (BuyPrice (PerctakeProfit / 100))) BuyTP2 (CgtBuyTP1) SellPrice (DayH-AF) SellTP1 (SellPrice - (SellPrice (PerctakeProfit / 100))) SellTP2 (CltSellTP1) PercchangegtPercChangemin AND percchangeltPercChangemax) prc (CgtpriceRL e CltpriceRH) BuyStop1 (BuyPrice - (BuyPrice (PercStoploss / 100))) BuyStop2IIf ((BuyStop1ltSellPrice) E SellPriceltBuyPrice, SellPrice, BuyStop1) SellStop1 (SellPrice (SellPrice (PercStoploss / 100))) 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 E TimeNum () lt 092900) x0 BarCount-LastValue (Barras) x1 BarCount-1 TOPLine LineArr (X0, LastValue (TOP), x1, LastValue (TOP), 0) PDHLine LineArray (x0, LastValue (PDH), x1, LastValue (PDH), 0) PDLLine LineArray (x0, LastValue (PDL), x1, LastValue (PDL), x1, LastValue (PDM), 0) FHHLine LineArray (x0, LastValue (PDL), x1, LastValue (PDC), 0) (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, color BrightGreen, styleDotsstyleNoRescale styleNoLine) Plot (IIf (pShowtradeLines, SellPriceline, Null), quotShor t Herequot, colorRed, styleDotsstyleNoRescale) PlotShapes (IIf (pShowMarkers AND Buy, shapeHollowUpArrow, Null), colorDarkGreen, 0, L, Offset-30) se (Status (QuotaIntercação) quotBHS2 Systemquot quot - quot Nome () quot - quot EncodeColor (colorYellow) Intervalo (2) EncodeColor (colorYellow) quot - quot Date () quot - quode 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 Quota Quota Quet (Percchange) quot quot quotquot quotquot Quest DayHighquotWriteVal (PDH, 1) quot, DayLowquotWriteVal (PDL, 1) quot, Today HighquotWriteVal (DayH, 1) quot, Tods LowquotWriteVal (DayL, 1) Comm2 (quotn quotVrquot Phase: quot) WriteIf (HacgtBG3, EncodeColor (colorB RightGreen) quotUp quot, WriteIf (HacltBR3, EncodeColor (colorRed) quot-Downquot, EncodeColor (colorLightYellow) quotlt Flat gtquot)) GfxSetOverlayMode (modo 0) GfxSelectPen (colorLightBlue, 3) GfxSelectSolidBrush (colorLightYellow) 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 (4), 8) BR2LLV (HHV (High, 4) - ATR (4), 8) SetBarFillColor (IIf (O ltC, colorSeaGreen, colorOrange)) k Otimize (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) jHaCl Ose 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) // ----------- fim -------------- // LINHAS ADICIONADAS LINHAS MAIS TARDE // ---- pontos de pivô DayH TimeFrameGetPrice (quotHquot, in Diariamente, -1) // ontem alto DayL TimeFrameGetPrice (quotLuot, inDaily, -1) // low DayC TimeFrameGetPrice (quotCquot, inDaily, -1) // fechar DayO TimeFrameGetPrice (quotOquot, inDaily) // dia atual aberto HiDay TimeFrameGetPrice ( QuotHquot, inDaily) LoDay TimeFrameGetPrice (quotLuot, 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 - Estilo de estilo (PP - S1) Estilo de linha Estilo de espessuraNãoRescala cor de rcolorBlue cor scolorRed Pcolor ColorWhite Plot (R1, quotR1quot, rcolor, estilo) Plot (S1, quotS1quot, scolor, style) Plot (R2, quotR2quot, rcolor, style) Plot (S2, quotS3quot, scolor, style) 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) Titledispl Ay ParamToggle (quotDisplay 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) / Escala média cEMA34 sqrt ((x2EMA34 - x1EMA34) (x2EMA34 - x1EMA34) (y2EMA34 - y1EMA34) (y2EMA34 - y1EMA34)) ânguloEMA34 rodada (180 acos ((x2EMA34 - x1EMA34) / cEMA34) PI) TitleAngleEMA34 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 ângulo EMA34 lt-13.57, colorRed, IIf (angleEMA34 gt-13.57 E angleEMA34 lt-12.14, colorOrange, IIf (angleEMA34 gt-12.14 E angleEMA34 lt-1.71, colorLightOrange, colorYellow)))))))) Lote (EMA34, quotEMA 34quot CorangLEEMA, 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, IIf (C lt Ref (MA (L, 7), -1), -1, 0)) Hlv ValueQuando (Hld 0, Hld, 1) Hilo IIf (Hlv -1, MA (H 7), MA (L, 7)) Trigger IIf (CgtHilo, colorBlue, colorPink) // Plot (Hilo, quotHiLoquot, Trigger, styleStaircase) Título EncodeColor (colorWhite) Nome () quot - quode EncodeColor (colorRed) Interval (2 ) EncodeColor (colorTan) quot - quot Date () quot - quotquotOp-quotOquot quotquotHi-quotquot quotquotLo-quotLquot quotClot-quotQuq quotnquot quotVol quot WriteVal (V) quot, Today HighquotWriteVal (DayH, 2) quot, Tods LowquotWriteVal (DayL, 2) SECTIONBEGIN (quotBuySell-nodllquot) // ----------------- -------------------------------------------------- ------ SetChartOptions (0, chartShowArrowschartShowDates) N (Título StrFormat (quot Open g, Hi g, Lo g, Close g (.1f) quot, O, H, L, C, SelectedValue (ROC (C, 1 )))) T26 BHSda ((C-MA (C, T)) / MA (C, T)) 100 // func fixed Graph0BHSda Graph0Style24 Graph0BarColorIIf (BHSdagt0,5,4) GraphXSpace5 SetChartOptions (0, chartShowArrowschartShowDates) Plot (C (Q, quotColorquot, colorBlack), styleNoDraw) Plot (L, quotLowquot, ParamColor), Plot (QuotColorquot, colorBlack), StyleChatColor (QuotColorquot, colorBlack), StyleChat de StyleNoTitle) (O, quotOpenquot, ParamColor (quotColorquot, colorBlack), styleNoDraw). (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) / Value2) Plot (BSR1, quotquot, colorOrange, styleDashed) Plot (BSR2, quotquot, colorPaleBlue, styleDashed) r1 12 // Param (quotFast avgquot, 12, 2, 200, 1) r2 26 // Param (quotSlow avgquot, 26, 2, 200, 1) r3 9 // Param (quotSignal avgquot, 9, 2, 200, 1) Z 1 // Param (quotzigquot, 1,0,10,0.1) Cond1 Cross (MACD (r1, r2), Signal (R1, 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 (Vender, quotSellquot, quotquot) BSG IIf (Comprar, colorPaleGreen, IIf (Vender , ColorRose, colorDefault)) BSFG IIf (Comprar, colorDarkGreen, IIf (Vender, colorDarkRed, colorDefault)) se ((Status (quotarationquot) ActionExplore) OU (Status (quotactionquot) actionScan)) Filtro 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 (Comprar, 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 // ----------- -------------------------------------------------- -------------------------------------------- C1320 // Param (quotfonts Quotle-rightquot, 2.1,1.0,5.0,0.1) C1512 // Param (quotup-downquot, 12,1,20,1) Miny Status (quotaxisminyquot, 20,10,30,1) C142.1 // Param (quotleft-rightquot, 2.1,1.0,5.0,0.1) ) Maxy Estado (quotaxismaxyquot) Estado lvb (quotlastvisiblebarquot) Estado FVB (quotfirstvisiblebarquot) Estado pxwidth (quotpxwidthquot) Estado pxheight (quotpxheightquot) GfxSetBkMode (transparent1) GfxSetOverlayMode (1) GfxSelectFont (quotTahomaquot, Estado (quotpxheightquot) / C13) GfxSetTextAlign (6) GfxSetTextColor (ColorRGB (103,103,103)) GfxSelectFont (quotpxheightquot) / C15) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) /C130.4) GfxSetTextColor (ColorRGB (103,103,103)) GfxSelectFont (quotpxheightquot) Status (quotpxheightquot) /C130.45) GfxSetTextColor (colorWhite) GfxSelectFont (quotMS Sans Serifquot, 10, 500, False, False, 0) // ------------------- -------------------------------------------------- --------------------------- SetChartBkGradientFill (ParamColor (quotBgTopquot, colorDarkOliveGreen), Para MColor (quotBgBottomquot, colorDarkGrey)) pShowtradeLines ParamToggle (quotShow Trade Linesquot, quotNoYesquot, 1) VolminParam (quotVolume minimumquot, 50,0,10000000,50) VolmaxParam (quotVolume maximumquot, 1000000,0,10000000,50) priceRLParam (quotPrice Range Minquot, 50,1,120000,1) priceRHParam (quotPrice Range Maxquot, 20000,1,120000,1) BSPeChMi-25 // Param (quotPercentage Change Min setquot, -25, -100, 100, 0.1) BSPeChMa25 // Param (quotPercentage Alterar Max setquot, 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 High BSFHRg BSFHMrk BarsSince ( BSFHRggt0) NumBars 36000 / Interval (1) TimeFrameSet (inDaily) TOP Abrir PDH Ref (Alto, -1) PDL Ref (Baixo, -1) PDO Ref (Abrir, -1) PDC Ref (Close, -1) PDM (PDHPDL ) / 2 TimeFrameRestor E () 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, H, Null) aRthLd IIf ( IsdRth, L, 1000000) TOP TimeFrameExpand (TOP, inDaily, expandFirst) 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 (BuyPrice (BSPerTkProf / 100)) ) BSByTP2 (CgtBSByTP1) SellPrice (DayH-AF) BSSlTP1 (SellPrice - (SellPrice (BSPerTkProf / 100))) BSSlTP2 (CltBSSlTP1) BSPrCh (((C-TOP) / TOP) 100) Vol (VgtVolmin E VltVolmax) Percentagem (BSPrChgtBSPeChMi EBSPrChltBSPeChMa) prc (CgtpriceRL e CltpriceRH) BuyStop1 (BuyPrice - (BuyPrector (BSPerStLos / 100))) BuyStop2IIf ((BuyStop1ltSellPrice) E SellPriceltBuyPrice, SellPrice, BuyStop1) SellStop1 (SellPrice (SellPrice (BSPerStLos / 100))) SellStop2IIf ((SellStop1gtBuyPrice ) E SellPriceltBuyPrice, BuyPrice, SellStop1) BuyStopIIf ((Compre e NÃO BSByTP2), BuyStop2, Null) BuyTPIIf (Compre E NÃO BuyStop, BSByTP2, Null) Barras BarsSince (TimeNum () gt 85400 E TimeNum () lt 092900) x0 BarCount - LastValue (Barras) x1 BarCount-1 TOPLine LineArray (x0, LastValue (TOP), x 1, 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) 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 (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, styleDotsstyleN ORescale styleNoLine) Plot (IIf (pShowtradeLines, SellPriceline, Null), quotquot, co lorRed, styleDotsstyleNoRescale) if (Status (quotactionquot) actionIndicator) (Título EncodeColor (colorWhite) quotBuySell system quot quot - quot Nome () quot - quot EncodeColor (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 GfxSelectFont (quotArialquot, 12, 700, False) GfxSetTextColor (colorBrown) GfxSetTextAlign Quotquot), 15, 73) GfxSetTextColor (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 Sup / Res: quotWriteVal (BuyStopline, 1.2), quotquot), 15 147) BuyCross (j, nw) ShortCross (nw, j) SellCross (nw, j) CoverCross (j, nw) BuyExRem (Comprar, Vender) SellExRem (Vender, Comprar) 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 (Buy, quotSOUND C: WindowsMediaDing. wavquot, quotBuyquot WriteVal (O, 1.2), 1) 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.4) GfxSetTextColor (ColorRGB (103,103,103)) GfxTextOut (quotFromquot , Status (quotpxwidthquot) /C141.8, Status (quotpxheightquot) /C1510.5) GfxSelectFont (quotTahomaquot, 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 plotar 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) // GfxTextOut (WriteIf (Long ou shrt. QuotCMP quotWriteVal (C, 1.2), quotquot), 10, 215) GfxSetOverlayMode (modo 0) GfxSelectPen (colorOrange, 2) GfxSelectSolidBrush (colorBlack) GfxRoundRect (5,20, 250,63, 16, 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, Quais são os 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.325 // Param (quotPivot Hi quot, 0.325,0.001,2.0,0.002) HiLB 1 // Param (quotUp LookBackquot, 1,1, BarCount-1,1) pctL 0,325 // Param (quotPivot Lo quot, 0,325,0,001,2,0,0.002) LoLB 1 // Param (quotDown LookBackquot, 1,1, BarCount-1,1) Voltar 1 // Param (quotExtend Left 2quot, 1,1,500,1) Fwd 0 // Param (quotPlot Forwardquot, 0, 0, 500, 1) texto ParamToggle (quotPlot Textquot, quotOffOnquot, 1) hts -14 // Param (quotText Shiftquot, -14, - 50,50,0.10) estilo ParamStyle (quotLine Stylequot, styleLine, styleNoLabel) x BarIndex () pRp PeakBars (H, pctH, 1) 0 yRp0 LastValue (ValueW Hen (pRp, H, HiLB)) 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 (Nome (), 3) quotquot, 3.2, 3.2 ) ///////////////////////////////////////////////// ///////////////// ///////////////////////////////// ///////////////////////////////// if (text1) PlotText (quot 0, WriteVal (p00,1), LastValue (BarIndex ()) - (numbars / hts), p00I 0.05, color00) PlotText (quot23 quot WriteVal (r236,1), LastValue (BarIndex ()) - (numbars / hts), r236I 0.05, color00) PlotText (quot38 quot WriteVal (r382,1), LastValue (BarIndex ()) - (numbars / hts), r382I 0.05, color00) PlotText (quot50 quot WriteVal (r050,1), LastValue (BarIndex ()) - (numbars / hts), r050I 0.05, color00) PlotText (quot62 quot Write Val (r618,1), LastValue (BarIndex ()) - (numbars / hts), r618I 0,05, color00) PlotText (quot78 quot WriteVal (r786,1), LastValue (BarIndex ()) - (numbars / hts), r786I 0.05, color00) PlotText (quot100 quot WriteVal (p100,1), LastValue (BarIndex ()) - (numbars / hts), p100I 0.05, color00) PlotText (quot127 quot WriteVal (e127,1), LastValue (BarIndex ()) - (numbars / hts), e127I 0.05, color00) PlotText (quot162 quot WriteVal (e162,1), LastValue (BarIndex ()) - (numbars / hts), e162I 0.05, color00) PlotText (quot200 quot WriteVal (e200,1 ), LastValue (BarIndex ()) - (numbars / hts), e200I 0.05, color00) PlotText (quot262 quot WriteVal (e262,1), LastValue (BarIndex ()) - (numbars / hts), e262I 0.05, color00) PlotText (Quot424 quot WriteVal (e424,1), LastValue (BarIndex ()) - (numbars / hts), e424I 0.05, color00) YH TimeFrameGetPrice (quotHquot, inDaily, -1) // yesterdays high YL TimeFrameGetPrice (quotLquot inDaily, 1) // low YC TimeFrameGetPrice(quotCquot, inDaily, -1) // close YO TimeFrameGetPrice(quotOquot, inDaily) // current d ay open //Normal Pivot 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) /Buy or Sell Condition/ Buy Cross(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), quot3 EMAquot, ParamColor(quotColorquot, colorBlack ),styleNoRescale) /Plot Ribbon / Ribbon1IIf( EMA( Close. 3 )gtEMA( Close. 23 ),colorGreen, IIf(EMA( Close. 23 )gtEMA( Close. 3 ), colorRed, colorYellow)) Plot(3, quotRibbonquot, Ribbon1, styleOwnScale styleArea styleNoLabel,-0.5,100) SECTIONEND() uptCgtMA(C,21) AND CgtEMA(C,8) dntCltMA(C,21) AND CltEMA(C,8) nut( CltMA(C,21) AND CgtEMA(C,8)) OR ( CgtMA(C,21) AND CltEMA(C,8)) ColIIf(dnt, colorRed, IIf( upt, colorBlueGrey, IIf(nut, colorYellow, colorTan))) Plot( C, quotClosequot, col, styleNoTitle ParamStyle(quotStylequot) GetPriceStyle() ) Filter1 AddColumn(C, quotclosequot,1.2,1,Col)

No comments:

Post a Comment