Bhs trading system afl


C lear, Preciso, fácil de ler, sinais objetivos em todos os negócios Tem sido rigorosamente comercializado Mercado de ações, Forex e mercados de futuros Mercado de dia, Swing e posição de negociação Negociação Trading Decisões com base no preço e Volume Movimento. Os sistemas que compram e vendem sinais são calculados por um algoritmo proprietário, testado de novo com base apenas em dados de preços em tempo real ou de fim de dia - oferecendo sinais oportunos, específicos e objetivos para cada comércio, as fórmulas de Amibroker são ideais para a busca Lucros máximos. Todas as seguintes AFLs são escritas para fórmulas AmiBroker (AFL). Quase cada fórmula Amibroker está equipada com muitos parâmetros e funções de análise facilmente variáveis ​​para exibir a informação que é importante para você. Todas as fórmulas Amibroker são escritas para todos os mercados e todos os tempos. 1. 9TradingSupport e ResistanceNow bhs systems buy sell nifty Abaixo está afl semelhante ao acima, do qual eu havia copiado - talvez este fórum apenas: SECTIONBEGIN (quotMA Diffquot) T26 KMA ((C-MA (C, T)) MA (C, quotClosequot, ParamColor (quotColorquot, colorBlack), styleNoTitle ParamStyle (quotStylequot) GetPriceStyle ()) 100 Graph0KMA Graph0Style24 Graph0BarColorIIf (KMAgt0,5,4) GraphXSpace5 SECTIONBEGIN (quotPricequot) SetChartOptions (0, chartShowArrowschartShowDates) SECÇÃO () 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 Co Nd3 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) forma Compre shapeHol LowUpTriangle Vender shapeHollowDownTriangle PlotShapes (forma, IIf (Comprar, colorBlue, colorBlue), 0, IIf (Comprar, Baixo, Alto)) GraphXSpace 7 SECTIONEND () SECTIONBEGIN (quotEMA3quot) P ParamField (quotPrice fieldquot, -1) Periods 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 (quotpxheightquot) C13) GfxSetTextAlign (6) GfxSetTextColor (ColorRGB (217,217,213)) GfxTextOut (Name (), Status (quotpxwidthquot) C14, Status (quotpxheightquot) C15) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C130.5) GfxSetTextColor (ColorRGB (103, 103, 103)) GfxTe XtOut (quotquot, Status (quotpxwidthquot) C14, Status (quotpxheightquot) C152.5) ​​GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C130.5) GfxSetTextColor (ColorRGB (103,103,103)) GfxTextOut (quot quot, Status (quotpxwidthquot) C14, Status ( Quatro vezes a fase inicial Aqui Arquivo: BHS Chart SECTIONBEGIN (quotBHS1.02quot) SetChartBkColor (ParamColor (QuotOuter tamanho do painel quot, colorLightYellow)) SetChartBkColor (ParamColor (SubmeterChartBkColor (quotMS Sans Serifquot, 10, 500, False, False, 0) QuotBackGround Colorquot, colorBlack)) pShowtradeLines ParamToggle (quotShow Trade Linesquot, quotNoYesquot, 1) pShowMarkers ParamToggle (quotShow Markersquot, quotNoYesquot, 1) synchParamToggle (quotSynchronize buyshort com índice estrangeiro, 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 (quo TPercentage 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) PercStoplossParam (quotStopLoss Percentual Setoot, 1,0.2,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 Open 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) TOP TimeFrameExpand (TOP , InDaily, expandFirst) PDH TimeFr Expandir (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 (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, Compressão) 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 (Ha L, 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 (PerctakeProfit100))) BuyTP2 (CgtBuyTP1) SellPrice (DayH-AF) SellTP1 (SellPrice - (SellPrice (PerctakeProfit100) ) () () () () () () () () () (C-TOP) TOP) (PerchchangegtPercChangemin 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 (Buy AND NOT BuyStop , BuyTP2, Null) Barras 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) 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 pquo T, colorBrightGreen, 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 (Título EncodeColor (colorChat) quotBHS2 Systemquot quot - quot Nome () quot - quot EncodeColor (colorYellow) Intervalo (2) EncodeColor (colorYellow) 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 quotquot) quotnot quot Previous DayHighquotWriteVal (PDH, 1) quot, DayLowquotWriteVal anterior (PDL, 1) quot, Today HighquotWriteVal (DayH, 1) quot, Tods LowquotWriteVal (DayL, 1) Comm2 (quotn quotVrquot Phase: quot) WriteIf (HacgtBG3, EncodeColor (ColorBrightGreen) 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. QuotLow Target 1: quot (BuyTP1), quotquot), 30, 105) GfxTextOut (WriteIf (SellPrice, quotSell Below: quot (SellPrice), quotquot), 30, 120) GfxTextOut (WriteIf (SellStop2, quotShort SL: quot (SellStop2) , QuotVolumequot, 1.0) AddColumn (Percchange, quotChange quot, 1.2) AddColumn (BuyPrice, quotChange quot, 1.2) AddColumn (Buychange, quotChange, 1.0) CompreColumn (SellPrice, quotShort atquot, 1.2) AddColumn (SellPrice, quotShort atquot, 1.2) AddColumn (SellTP1, quotShort earn atquot, 1.2) SECTIONBEGIN (quotshort signalquot) HaClose (addTol, quotBuy Stop atquot, 1.2) AddColumn (BuyPlay, quotBuy Stop 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 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) 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 (Vender, Comprar) ShortExRem (Short, Cover) CoverExRem (Cover, Short) PlotShapes (IIf (Buy, shapeUpArrow, shapeNone), colorWhite, 0, halow -30) PlotShapes (IIf (Vender, shapeHollowDownTriangle, shapeNone), colorWhite, 0, hahigh, -15) PlotShapes (IIf (Capa, shapeHollowUpTriangle, shapeNone), ColorWhite, 0, halow, -15) PlotShapes (IIf (Short, ShapeDownArrow, shapeNone), colorWhite, 0, hahigh, -30) ----------- fim -------------- PADRÕES ADICIONADOS LINHAS MAIS TARDE ---- pontos de pivô DayH TimeFrameGetPrice (quotHquot, inDaily, -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 (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 ColorWhite 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, style) 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 E angleEMA34 lt-12.14, colorOrange, IIf (angleEMA34 gt-12.14 E angleEMA34 lt-1.71, colorLightOrange, colorYellow)))))))) Lote (EMA34, quotEMA 34quot, ColorANGLEEMA, styleLine styleThick styleNoLabel) Lote (Lsma, quatLSMA 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 ValueQuando (Hld 0, Hld, 1) Hilo IIf (Hlv -1, MA (H, 7), MA (L, 7)) Trigger IIf (CgtHilo, colorBlue, colorPink) Lote (Hilo, quotHiLoquot, Trigger, styleStaircase) Título EncodeColor (colorWhite) Nome () quot - quot EncodeColor (colorRed) Interval (2) EncodeColor (colorTan) quot - quot Date ( ) QuotquotOp-quotOquot quotquotHi-quotHquot quotquotLo-QuotQot quotCl-quotCquot quotquot 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 fixo 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) Plot ( BSR1, quotquot, colorOrange, styleDashed) Plot (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) Compre Cond1 e 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 (Venda, quotSellquot, quotquot) BSG IIf (Comprar, colorPaleGreen, IIf (Vender, colorRose, colorDefault)) BSFG IIf (Comprar, colorDarkGreen, IIf (Vender , ColorDarkRed, colorDefault)) se ((Status (quotactionquot) actionExplo Re) 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 , Addotol, 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 (shape, 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) lvb Status (quotlastvisiblebarquot) fvb Status (quotfirstvisiblebarquot) 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 (quotBgBottomquot, col OuDarkGrey)) 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-25Param (quotPercentage Change Min setquot, -25, -100, 100, 0.1) BSPeChMa25Param (quotPercentage Change 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 (DataNum ())) BSFHRg (TimeNum () gt 090000 E TimeNum () lt 093000) E (DateNum () LastValue (DateNum ())) BSFHPrc High BSFHRg BSFHMrk BarsSince (BSFHRggt0) NumBars 36000 Intervalo (1) TimeFrameSet ( InDaily) TOP Open PDH Ref (Alto, -1) PDL Ref (Baixo, -1) PDO Ref (Open, -1) PDC Ref (Close, -1) PDM (PDHPDL) 2 TimeFrameRestore () isTodos True isRth TimeNum () G T 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, 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 M Machado (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 (BSPerTkProf100))) BSByTP2 (CgtBSByTP1) SellPrice (DayH-AF) BSSlTP1 (SellPrice - (SellPrice (BSPerTkProf100))) BSSlTP2 (CltBSSlTP1) BSPrCh (((C-TOP) TOP) 100) Vol (VgtVolmin E VltVolmax) Percentagem (BSPrChgtBSPeChMi E 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 (Buy AND OUT BuyStop, BSByTP2, Null) 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 (x 0, 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, styleDotsstyleNoRescale styleNoLine) Plot (IIf (pShowtrad ELines, SellPriceline, Null), quotquot, co lorRed, styleDotsstyleNoRescale) se (Status (quotactionquot) actionIndicator) (Título EncodeColor (colorWhite) quotBuySell quot quot - quot Nome () quot - quode EncodeColor (colorYellow) Intervalo (2) EncodeColor ( Color Query - 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, Baixo 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) GfxSelectF (Gestor, 12, 700, Falso) GfxSetTextColor (colorBrown) GfxSetTextAlign (0) GfxSetTextColor (colorPaleGreen) GfxTextOut (WriteIf (BuyPrice, quotLong Target 1: quotWriteVal (BuyPrice, 1.2), quotquot), 15, 73) GfxSetTextColor (colorLightBlue) GfxTextOut (WriteIf (BSByTP1. QuotLinkVict (SellPrice, 1.2), quotquot), 15, 111) GfxSetTextColor (colorRed) GfxSetTextColor (colorRed) GfxTextOut (WriteIf (SellPrice, QuotShort Target 1: quotWriteVal (BSPyTP1,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 ( Colorimage (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 (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 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. Sinal QuotBUY Ao quotWriteVal (Buy2show, 1.2), quotquot), 10, 185) GfxTextOut (WriteIf (Sell OU SHT. QuSTO SIGN 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, 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 (quotPlot 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) r82I 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), r236I 0.05, color00) PlotText (quot38 quot WriteVal (r382,1), LastValue (BarIndex ()) - (numbarshts), r382I 0.05, color00) PlotText (quot50 quot WriteVal (r050, 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(quotLquot, inDaily, -1) low YC TimeFrameGetPrice(quotCquot, inDaily, -1) close YO TimeFrameGetPrice( quotOquot, inDaily) current day 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)

Comments

Popular Posts