GraphXSpace 7 SetChartOptions (0, chartShowArrowschartShowDates) HACLOSE (OmHmLmCm) 4 HaOpen AMA (Ref (HaClose, -1), 0,5) HaHigh Max (Hm, Max (HaClose, HaOpen)) HaLow Min (Lm, Min (HaClose, HaOpen)) (Hahl, per2) LfIIf (haOpenlthaFechar, MA (Halow, per2), MA (Hahigh, per2)) HfIIf (haOpenlthaFechar, MA (Hahigh, per2), MA (Halow, per2)) Cor IIf (Cf gt Of, colorGreen, colorRed) TrailStop HHV (C - 2 ATR (10), 15) ProfitTaker EMA (H, 13) 2 ATR (10) Código para identificar automaticamente pivôs - qual será o nosso alcance de lookback para o hh E ll farback140 Como longe voltar para ir nBars 12 Número de barras - Criar arrays inicializados em 0 o tamanho do compasso de escala - Mais para uso futuro, não é necessário para o traçado básico aHPivHighs H - H aLPivLows L - L aHPivIdxs H - H aLPivIdxs L - L - olhando para trás da barra atual, quantas barras de trás foram os valores hhv e llv do anterior aHHVBars HHVBars (H, nBars) aLLVBars LLVBars (L, nBars) aHHV HHV (H, nBars) aLLV L LV (L, nBars) - Gostaria de configurar isso para que os pivôs sejam calculados de volta da última barra visível para facilitar a volta e ver os pivôs que este código encontraria. No entanto, a primeira instância da saída de rastreio mostrará um valor de 0 nLastVisBar LastValue (Mais alto (IIf (aVisBars, BarIndex (), 0))) TRACE (Última barra visível: nLastVisBar) - Inicialize o valor de curTrend se (aLLVBarscurBar ltAmazing AFL Para NIFTY Intraday Trading Amazing AFL para NIFTY Intraday Trading Eu encontrei pela pesquisa do Google, mas eu não sei como usá-lo, Seniors Pleasse guide 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) SECÇÃO () SECTIONBEGIN (qu OtMACD 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 (Compre, 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, shapeCircle, shapeNone), ColorBlue, 0, L, Offset-60) PlotShapes (IIf (Sell, shapeCircle, shapeNone ), ColorBlue, 0, H, Offset-30) Filtro 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 (Comprar , QuotBuyquot, 1) AddColumn (Vender, quotSellquot, 1) shape Comprar shapeHollowUpTriangle 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) GfxSetT ExtAlign (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 ( QuotAgestão de status (quotpxwidthquot) C14, Status (quotpxheightquot) C152.5) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C130.5) GfxSetTextColor (ColorRGB (103,103,103)) GfxTextOut (quotmr. ajeetsinghyahooquot, Status (quotpxwidthquot) C14, Status (quotpxwidthquot) C14, Status (quotpxheightquot) Quatro vezes, F5, 500, Falso, Falso, 0) A segunda fase começa Aqui Arquivo: Gráfico BHS SECÇÃO BEGIN (quotTradingquot) SetChartBkColor (ParamColor (quotOutor tamanho da cor quot, colorLightYellow)) SetChartBkColor (ParamColor (quotBackGround Colorquot) , ColorBlack)) pShowtradeLines ParamToggle (quotShow Trade Linesquot, quotNoYesquot, 1) pShowMarkers ParamToggle (quotShow Markersquot, quotNoYesquot, 1) synchParamToggle (quotSynchronize buy sho Rt 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 (quotPercentage Change Min setquot, -25, -100, 100, 0.1) PercChangemaxParam (quotPercentage Change Max setquot, 25, -100, 100, 0.1) PerctakeProfitParam (quotTake Profit Porcentagem Setquot, 0.6,0.3,30,0.1) PercStoplossParam (quotStopLoss Percent Set Set, 0.25,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 High 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 (P DHPDL) 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) (PDD, inDaily, expandFirst) PDO TimeFrameExpand 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) Foreign SECTIONBEGIN (quotforeign Index bar graphquot) VrParamList (quotIndexquot, List quotNSEI, NSEBANK, CNXIT, NSMIDCP, RELIANCE. NS, SBIN. N Squot, 0) SetForeign (Vr) HaC (OHLC) 4 HaO AMA (Ref (HaC, 1H), 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) percchange ((((C - TOP) TOP) 100) Vol (VgtVolmin AND VltVolmax) Percentagem (percchangegtPercChangemin AND percchangeltPercChangemax) prc (CgtpriceRL e CltpriceRH) BuyStop1 (BuyPrice - (BuyPrice (PercStoploss 100))) BuyStop2IIf ((BuyStop1ltSellPrice) E SellPriceltBuyPrice, SellPrice, BuyStop1) SellStop1 (SellPrice (SellPrice (PercS Toploss 100))) SellStop2IIf ((SellStop1gtBuyPrice) E SellPriceltBuyPrice, BuyPrice, SellStop1) BuyStopIIf ((Compre e NÃO BuyTP2), BuyStop2, Null) BuyTPIIf (Compre E NÃO BuyStop, BuyTP2, Null) Barras BarsSince (TimeNum () gt 85400 AND (X0, LastValue (TOP), 0) PDHLine LineArray PDLLine LineArray (x0, LastValue (PDL), x1, LastValue (PDL), 0) PDCLine LineArray (x0, LastValue (PDC), x1, LastValue (PDC), 0) PDMLine LineArray (x0, LastValue ( PDH), 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 (x 0, 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) (TítuloCodeColor (colorWhite) quotTrading Systemquot quot - QuestShor t Herequot, colorRed, styleDotsstyleNoRescale) PlotShapes (IIf (pShowMarkers AND Buy, shapeHollowUpArrow, Null), colorDarkGreen, 0, L, Offset-30) se (Status (quotactionquot) actionIndicator) Quot Name () quot - quot EncodeColor (colorYellow) Interval (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 - Low quot WriteVal (L, 1) EncodeColor (colorYellow) quot - Close quot WriteVal (C , 1) EncodeColor (colorYellow) quot - Vol quot WriteVal (V, 1) (quotnquot) WriteIf (Percchange, quot Change quot (Percchange) quot quotquot) quotquot anterior DayHighquotWriteVal (PDH, 1) quot, DayLowquotWriteVal (PDL, 1) quot, Today HighquotWriteVal (DayH, 1) quot, Tods LowquotWriteVal (DayL, 1) WriteIf (HacgtBG3, EncodeColor (colorBrightGreen) quotUp quot, WriteIf (HacltBR3, EncodeColor (colorRed) quot-Downquot, EncodeColor (colorLightYellow) quotlt Flat gtquot ))) GfxSelectForm (quotArialquot, 10, 700, False) GfxSelectPen (colorLightBlue, 3) GfxSelectPen (colorLightBlue, 3) GfxSelectSolidBrush (colorLightYellow) GfxRoundRect (20, 55, 180, 175, 15, 15) GfxSelectFont (quotArialquot, 10, 700, False) GfxSetTextColor (colorBrown) GfxSetTextAlign (0) GfxTextOut (WriteIf (SellPrice, quotTRP level: quot (SellPrice), 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) 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 (Vender, Comprar) ShortExRem (Short, Cover) CoverExRem (Cover, Short) dist 1.5ATR (15) para (i 0 i lt BarCount i) if (Buyi) PlotText (quotBuyquot O i, i, L i - Trendi, colorDarkBlue, colorYellow) se (Selli) PlotText (quotSellquot H i, i-4, L i Trendi, colorRed, colorYellow) 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 --------- ----- Re: Amazing AFL para NIFTY Intraday Trading Verifique com isso, agora trabalhando 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 (QuotPorter fieldquot) change Param (quot changequot, 5,0.1,25,0.1) SECTIONEND () SECTIONBEGIN (quotEMAquot) P ParamField (quotPreço fieldquot, -1) Períodos Param (quotPeriodsquot, 15, 2, 300, 1, 10) SECÇÃO () 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 (Compre, 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, shapeCircle, shapeNone), ColorBlue, 0, L, Offset-60) PlotShapes (IIf (Sell, shapeCircle, shapeNone ), ColorBlue, 0, H, Offset-30) Filtro 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 (Vender, quotSellquot, 1) shape Comprar shapeHollowUpTriangle 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) ) GfxSetBowMode (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 (quotpxhe ≥) C30.5) GfxSetTextColor (ColorRGB (103,103,103)) GfxTextOut (quotAJEET SINGHquot, Status (quotpxwidthquot) C14, Status (quotpxheightquot) C152.5) GfxSelectFont (quotTahomaquot, Status (quotpxheightquot) C130.5) GfxSetTextColor (ColorRGB (103,103,103) ) GfxTextOut (quotmr. ajeetsinghyahooquot, Status (quotpxwidthquot) C14, Status (quotpxheightquot) C154) GfxSelectFont (quotMS Sans Serifquot, 10, 500, False, False, 0) Segunda fase começa Aqui Arquivo: BHS Chart SECTIONBEGIN (quotTradingquot) SetChartBkColor (ParamColor (QuotShow Markersquot, quotNoYesquot, 1) synchParamToggle (quotSynchronize buy short with foreign indexquot, quotNoYesquot) (quotShow Trade Linesquot, quotNoYesquot, 1) synchParamToggle (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 Change Min setquot, -25, -100, 100, 0.1) PercChangemaxParam (quotPercentage Change Max setquot, 25 , -100, 100, 0.1) PerctakeProfitParam (quotTake Profit Percent Setquot, 0.6,0.3,30,0.1) PercStoplossParam (quotStopLoss Percent Set Set, 0.25,0.2,5,0.1) PlotOHLC (Open, High, Low, Close, quotquot, colorWhite , EstiloCa 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 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, inDaily, expandFirst) PDL TimeFrameExpand (PDL, inDaily, expandFirst) PDO TimeFrameExpand (DOP, 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 ( (HaC, HaO)) HaL Min (L, Min (HaC, HaO)) BG3HHV (LLV (HaL, 4) ATR (HLC, -1), 0,5) HaH Max (H, Max (HaC, HaO) 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) percchange (((C-TOP) TOP) 100) Vol (VgtVolmin AND VltVolmax) Percentagem (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 N Ull) 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 pquot, colorBrightGreen, styleDotsstyleNoRescale styleNoLine) Plot (IIf (pShowtradeLines, SellPriceline, Null), quotShor t Aqui (ColorRed, styleDotsstyleNoRescale) PlotShapes (IIf (pShowMarkers AND Buy, shapeHollowUpArrow, Null), colorDarkGreen, 0, L, Offset-30) se (Status (quotactionquot) actionIndicator) (Título EncodeColor (colorWhite) quotTrading Systemquot quot - quot Name ( ) Quot - EncodeColor (colorYellow) Interval (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 - Low quot WriteVal (L, 1) EncodeColor (colorYellow) quot - Close quot WriteVal (C, 1) EncodeColor (colorYellow) quot - Vol quot WriteVal (V, 1) (quotnquot) WriteIf (Percchange, Quot Change quot (Percchange) quot quot quotquot) quotquot Previous DayHighquotWriteVal (PDH, 1) Quot, DayQuivotWriteVal (PDL, 1), Today HighquotWriteVal (DayH, 1) quot, Tods LowquotWriteVal (DayL, 1) WriteIf (HacgtBG3, EncodeColor (colorBrightGreen) quotUp quot, WriteIf (HacltBR3, EncodeColor (colorRed) quot-Downquot, EncoderColor (colorLightYellow) quotlt Flat gtquot))) GfxSetOverlayMode (modo 0) GfxSelectPen (colorLightBlue, 3) GfxSelectSolidBrush (colorLightYellow) GfxSetBkMode (1) GfxSelectFont (quotArialquot, 10, 700) GfxSetBow (20, 55, 180, 175, 15) Falso) GfxSetTextColor (colorBrown) GfxSetTextAlign (0) GfxTextOut (WriteIf (SellPrice, quotTRP level: quot (SellPrice), 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) 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 (Vender, Comprar) ShortExRem (Short, Cover) CoverExRem (Cover, Short) dist 1.5ATR (15) para (i 0 i lt BarCount i) if (Buyi) PlotText (quotBuyquot O i, i, L i - Trendi, colorDarkBlue, colorYellow) se (Selli) PlotText (quotSellquot H i, i-4, L i Trendi, colorRed, colorYellow) 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 --------- -----
Comments
Post a Comment