Nishant Sistema De Negociação Afl


Não se surpreenda com o título do artigo. Estou compartilhando um sistema de negociação criado pelo Sr. Nishant Kulkarni. Estou observando-o de muito poucos dias. Está dando resultados muito bons. Características de Nishant Intraday Tradin g Sistema para NSE: - Isto é projetado em Mircosoft Excel. Obtém dados do NSE Server (pode haver atraso de 10 mins) Dá Intraday Nifty Futuro Long / Short Call com SL e Target. Dá Intraday MiniNifty Futuro Long / Short Call com SL e Target. Dá Intraday BankNifty Futuro Long / Short Call com SL e Target. Oferece Intraday Nifty opção longa / curta chamada com SL e Target. Abaixo está a imagem de Nishant Trading Systme For NSE. Download Nishant Trading System8212 Click160 Aqui Para Mais Leitura, Banknifty Sistema de Negociação, Free DownLoads, Free Intraday Dicas, Free Nifty chamadas, Free Nifty opção chamadas, Intraday Trading System, Nifty Trading System, sistemas de negociação e configuração Man Behind TraderAdda SAM. Um graduado na ciência é um blogger de meio expediente e comerciante profissional a tempo completo de India. Na TraderAdda ele escreve sobre Trading Systems, Amibroker Indicadores e AFLs, Trading Ebooks, Trading Recursos, Nifty Intraday Níveis, Nifty Positional View, e muitos mais outros recursos de negociação. Sua área de interesse são Análise Técnica, Desenvolvimento de Estratégias de Negociação, Blogging, Gadgets e Leitura. Espero que você vai encontrar TraderAdda útil. Os seus comentários / Sugestões / Feedback são importantes para nós. Total de páginas vistas Protegido Site-Não Copiar Trader Adda Ultimate Trading Recursos 2011-12 Trader Adda Ultimate Trading Recursos. Os artigos não podem ser reproduzidos sem a permissão do autor. KAMAS 1.0 Sistema com StoCCI para Amibroker 8211 Código AFL KAMAS 1.0 é um sistema interessante de fácil utilização baseado em conceitos fornecidos por Maus K878 828 adaptável, é reforçada com indicador StoCCI, indicador PPO. Auto-trendline e fibonacci agrupar 8211 auto fib níveis onde você clica no gráfico. Inteiramente customizável. Claro que você deve otimizar alguns parâmetros. Baseado na tecnologia fornecida por www. pcinvestor / anteriormente stockcharts. Como o sistema de negociação KAMAS 1.0 Principais janelas mostra sinais. Também são fornecidos níveis de fibonnacci. Então você deve estar familiarizado com a teoria fibonnacci. Há pplotted possível linha de tendência. Você pode definir muitos parâmetros ao clicar com o botão direito do mouse nos painéis AB. Quando você tem vender / curto sinal de StoCCI 8211 é quando o indicador atinge 100 olhar para a confirmação de PPO e janelas principais (setas e texto). Oposto para comprar / cobrir. Fib níveis devem ajudá-lo a encontrar possíveis níveis de apoio e resistência. StoCCI 8211 inteiramente customizável 8211 mostra sinais quando reachin 100 e 0, também ao cruzar EMA (média do movin) e pontos quando alcança níveis desejados de OB ou de OS 8211 que você ajusta estes níveis com um estalido. Rememember 8211 é razoável olhar para (pelo menos) dois quadros de tempo. De hora em hora, 15, 5 min é desejável para o comércio de conforto. Você pode procurar divergências em PPO. Tratar StoCCI como mais rápido 8220brother8221 de PPO e você será mais rápido, em seguida, outros na multidão. Veja a seguir os parâmetros usados ​​na captura de tela. Se algo não estiver claro basta olhar para o código (editar) e você não vai mais. Este material é código aberto Para instalar o sistema basta copiar e colar alle 2 arquivos para fórmulas / personalizado no diretório AB. Sobre Rajandran Rajandran é um comerciante em tempo integral e fundador da Marketcalls, muito interessado em construir modelos de cronometragem, algos. Discricionária negociação conceitos e Trading Sentimental análise. Ele agora instrui usuários de todo o mundo, de comerciantes experientes, comerciantes profissionais para comerciantes individuais. Rajandran frequentou a faculdade em Chennai, onde ganhou um BE em Eletrônica e Comunicações. Rajandran tem uma compreensão ampla de softwares de negociação como Amibroker, Ninjatrader, Esignal, Metastock, Motivewave, Analista de Mercado (Optuma), Metatrader, Tradingivew, Python e compreende as necessidades individuais de comerciantes e investidores utilizando uma ampla gama de metodologias. Comentários hhhmmm este é um pago um ampère nt livre 8230 Requerido US Governo Disclaimer CTFC Regra 4.41 Negociação de futuros contém risco substancial e não é adequado para todos os investidores. Um investidor poderia potencialmente perder todo ou mais do que o investimento inicial. Capital de risco é dinheiro que pode ser perdido sem comprometer a segurança financeira ou estilo de vida. Considere apenas o capital de risco que deve ser usado para negociação e apenas aqueles com capital de risco suficiente deve considerar a negociação. O desempenho passado não é necessariamente indicativo de resultados futuros. REGRA 4.41 DO CTFC OS RESULTADOS HIPOTÉTICOS OU SIMULADOS DO DESEMPENHO TÊM CERTAS LIMITAÇÕES. DESCONHECIDO UM REGISTO DE DESEMPENHO REAL, OS RESULTADOS SIMULADOS NÃO REPRESENTAM A NEGOCIAÇÃO REAL. TAMBÉM, SENDO QUE OS COMÉRCIOS NÃO FORAM EXECUTADOS, OS RESULTADOS PODERÃO TER OUTROS COMPENSADOS PELO IMPACTO, SE HOUVER, DE CERTOS FACTORES DE MERCADO, COMO A LIQUIDEZ. OS PROGRAMAS DE NEGOCIAÇÃO SIMULADOS EM GERAL SÃO TAMBÉM SUJEITOS AO FATO QUE SÃO PROJETADOS COM O BENEFÍCIO DE HINDSIGHT. NENHUMA REPRESENTAÇÃO ESTÁ SENDO SENDO QUE QUALQUER CONTA PODERÁ OU É POSSÍVEL CONSEGUIR LUCROS OU PERDAS SEMELHANTES AOS MOSTRADOS. Todos os comércios, padrões, gráficos, sistemas, etc. discutidos neste site ou anúncio são apenas para fins ilustrativos e não são interpretados como recomendações específicas de consultoria. Todas as idéias e materiais aqui apresentados são apenas para fins informativos e educacionais. Nenhum sistema ou metodologia de negociação nunca foi desenvolvido que possa garantir lucros ou evitar perdas. Os depoimentos e exemplos aqui utilizados são resultados excepcionais que não se aplicam a pessoas comuns e não se destinam a representar ou garantir que qualquer pessoa vai conseguir os mesmos ou resultados semelhantes. Trades colocados na dependência de sistemas Trend Métodos são tomadas por sua conta e risco. Esta não é uma oferta para comprar ou vender interesses futuros. Copyright 2015 Marketcalls Serviços Financeiros Pvt Ltd middot Todos os Direitos Reservados middot E Nosso Sitemap middot Todos os logos e marcas comerciais pertence a seus respectivos proprietários Os dados e informações são fornecidos para fins informativos apenas e não se destinam a fins comerciais. Nem o site de marketcalls. in nem qualquer um dos seus promotores será responsável por quaisquer erros ou atrasos no conteúdo, ou por quaisquer ações tomadas em confiança nisso. AFL Para INTRADAY BOM PARA INTRADAY TREDING SECTIONBEGIN (Preço) SetChartOptions (0, chartShowArrowschartShowDates) N ( Título StrFormat (- Abrir g, Hi g, Lo g, Fechar g (.1f), O, H, L, C, SelectedValue (ROC (C, 1))) Plot (C, Close, ParamColor (Color, colorBlack ), StyleNoTitle ParamStyle (Estilo) GetPriceStyle ()) SECTIONEND () SECTIONBEGIN (DispMA) P ParamField (Campo) Tipo ParamList (Tipo, Simples, Exponencial, Exponencial Duplo, Tripple Exponencial, Wilders, Ponderado) Períodos Param (Períodos, 30, , 300) Deslocamento Param (Deslocamento, 15, -50, 50) m 0 if (Tipo Simples) m MA (P, Períodos) if (Tipo Exponencial) m EMMA (P, Períodos) P, Períodos) if (Tipo Tripple Exponencial) m TEMA (P, Períodos) if (Tipo Wilders) m Wilders (P, Períodos) if (Tipo Ponderado) m WMA (P, Períodos) (Color, ColorCycle), ParamStyle (Estilo), 0, 0, Deslocamento) SECÇÃOBEGIN (EMA1) P ParamField (Campo de preço, -1) Períodos Param (Períodos, 15, 2, 300, 1, 10) Parâmetros Parâmetros (Períodos, 15, 2, 300, 3) Parâmetros Parâmetros (Períodos, 15, 2, 300, (EMA) P ParamField (Campo de preço, -1) Parâmetros Parâmetros (Períodos, Períodos, Parâmetros) 15, 2, 300, 1, 10) Plot (EMA (P, Períodos), DEFAULTNAME (), ParamColor (Cor, colorCycle), ParamStyle (Estilo) Título StrFormat (- Abrir g, Hi g, Lo g, Fechar g (.1f), O, H, L, C, SelectedValue (ROC (C, 1))) Plot (C, Close, ParamColor (Color, colorBlack ), StyleNoTitle ParamStyle (Estilo) GetPriceStyle ()) SECTIONEND () SECTIONBEGIN (DispMA) P ParamField (Campo) Tipo ParamList (Tipo, Simples, Exponencial, Exponencial Duplo, Tripple Exponencial, Wilders, Ponderado) , 300) Deslocamento Param (Deslocamento, 15, -50, 50) m 0 if (Tipo Simples) m MA (P, Períodos) if (Tipo Exponencial) m EMMA (P, Períodos) P, Períodos) if (Tipo Tripple Exponencial) m TEMA (P, Períodos) if (Tipo Wilders) m Wilders (P, Períodos) if (Tipo Ponderado) m WMA (P, Períodos) (Color, ColorCycle), ParamStyle (Estilo), 0, 0, Deslocamento) SECÇÃOBEGIN (EMA1) P ParamField (Campo de preço, -1) Períodos Param (Períodos, 15, 2, 300, 1, 10) Parâmetros Parâmetros (Períodos, 15, 2, 300, 3) Parâmetros Parâmetros (Períodos, 15, 2, 300, (EMA) P ParamField (Campo de preço, -1) Parâmetros Parâmetros (Períodos, Períodos, Parâmetros) 15, 2, 300, 1, 10) Plot (EMA (P, Períodos), DEFAULTNAME (), ParamColor (Color, colorCycle), ParamStyle (Estilo)) SETUPEND () PKIIf (PctVltlt0.5, 1), IIf (PctVltgt0.5 E PctVltlt 1.0, Peak (close, 0.70,1), IIf (PctVltgt1.0 E PctVltlt 1.5, Peak (close, 0.90,1), IIf (PctVltgt1.5 E PctVltlt 2.0, Peak ( Fim, 1,10,1), IIf (PctVltgt2,0 e PctVltlt 2,5, Peak (Close, 1,30,1), IIf (PctVltgt2,5 e PctVltlt 3,0, Peak (Close, 1,50,1), IIf (PctVltgt3,0 e PctVltlt 3,5, Peak (Close, 1,70,1), IIf (PctVltgt3,5 e PctVltlt 4,0, Peak (Close, 2,00,1), Peak (Close, 2,20,1)))))))) TGHIIf (PctVltlt0,5 , Trough (Close, 0,5,1), IIf (PctVltgt0,5 e PctVltlt 1,0, Trough (Close, 0,75,1), IIf (PctVltgt1,0 e PctVltlt 1,5, Trough (Close, 1,00,1), IIf (PctVltgt1. 5 e PctVltlt 2,0, Trough (Close, 1,25,1), IIf (PctVltgt2,0 e PctVltlt 2,5, Trough (Close, 1,50,1), IIf (PctVltgt2,5 e PctVltlt 3,0, Trough (Close, 1,75,1) IIf (PctVltgt3.0 e PctVltlt 3,5, Trough (Close, 2,00,1), IIf (PctVltgt3,5 e PctVltlt 4,0, Trough (Close, 2,25,1), Trough (Close, 2,50,1))))))) )) SensIIf (PctVltlt0.5,0.5, IIf (PctVltgt0.5 E PctVltlt 1,0, 0,75, IIf (PctVltgt1.0 E PctVltlt 1,5, 1,00, IIf (PctVltgt1.5 E PctVltlt 2.0, 1.25, IIf (PctVltgt2.0 E PctVltlt 2,5, 1,50, IIf (PctVltgt2.5 E PctVltlt 3.0, 1.75, IIf (PctVltgt3.0 E PctVltlt 3.5, 2.00, IIf (PctVltgt3.5 E PctVltlt 4.0, 2.25, 2,50)))))))) ColorIIf (BarsSince ( Cross (C, Ref (PK, -1))) ltBarsSince (Cruz (Ref (TGH, -1), C)), colorBrightGreen, colorRed) Plot (C, Chaloke Peak-Trough, Color, styleCandle) , 0,1, 0, 1, 0,001) accm Param (Max. Aceleração, Aceleração, 0.06, 0, 1, 0.001) Comprar Cross (Open, SAR, accm)) Vender Cross (SAR, Accm), Open PlotShapes (IIf (Buy, shapeUpArrow, shapeNone) , Offset-15) PlotShapes (IIf (Compra, shapeSmallCircle, shapeNone), colorYellow, 0, Low, Offset-28) PlotShapes (IIf (Sell, shapeDownArrow, shapeNone), colorWhite, 0, High, Offset-15) DayH TimeFrameGetPrice (H, inDaily, -1) DayHI LastValue (DayH, 1) // ontem alta DayL TimeFrameGetPrice (L, inDaily, -1) DayLI LastValue (DayL, 1) // dias de ontem DayC TimeFrameGetPrice (C, inDaily, -1) // yesterdaydays fechar DayO TimeFrameGetPrice (O, inDaily) // dia atual aberto DayH2 TimeFrameGetPrice (H, inDaily, -2) DayH2I LastValue (DayH2, 1) // Dois dias antes de alta DayL2 TimeFrameGetPrice (L, inDaily, -2) DayL2I LastValue (DayL2,1) // Dois dias antes de baixo DayH3 TimeFrameGetPrice (H, inDaily, -3) DayH3I LastValue (DayH3,1) // Três dias antes do alto DayL3 TimeFrameGetPrice (L, inDaily, -3) DayL3I LastValue (DayL3,1) // Três dias antes dos numbars baixos LastValue (Cum (Status (barvisible))) hts -33.5 YHL ParamToggle (Ontem HI LO, ShowHide, 1) if (YHL1) Plot (dayl, YL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (DayH, YH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) plotText (YH. LastValue (barIndex ()) - (numbars / HTS), DayHI, colorTurquoise) plotText (YL LastValue (barIndex ().) - (Numbars / HTS), DAYLI, colorTurquoise) TDBHL ParamToggle (2 / 3Days antes HI LO, MostrarEsconder, 0) if (TDBHL1) Plot (DayL2,2DBL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (DayH2,2DBH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (DayL3,3DBL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (DayH3,3DBH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) plotText (2DBH. LastValue (barIndex ()) - (numbars / HTS), DayH2I, colorTurquoise) plotText (2DBL LastValue (barIndex ().) - (numbars / HTS), DayL2I, colorTurquoise) plotText (3DBH LastValue (barIndex ().) - ( (N / B), N / N) // Niveles de Pivot // PP (DayL DayH DayC) / 3 PPI LastValue (PP, 1 ) // Pivot R1 (PP 2) - DayL R1I LastValue (R1,1) // Resistência 1 S1 (PP 2) - DayH S1I LastValue (S1,1) // Suporte 1 R2 PP R1 - S1 R2I LastValue (R2, 1) // Resistência 2 S2 PP - R1 S1 S2I LastValue (S2,1) // Suporte 2 R3 PP R2 - S1 R3I LastValue (R3,1) // Resistência 3 S3 PP - R2 S1 S3I LastValue (S3,1) // Suporte 3 ppl ParamToggle (níveis de pivô, MostrarEsconder, 1) if (ppl1) Plot (PP, PP, colorYellow, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (R1, R1, colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (S1, S1, colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) plotagem ( R2, R2, colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (S2, S2, colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (R3, R3, colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (S3, S3, colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) plotText (Pivot, LastValue (barIndex ()) - ( Numbars / Hts), PPI, colorYellow) PlotText (R1. LastValue (BarIndex ()) - (numbars / Hts), (S1I, colorViolet) PlotText (R2. LastValue (BarIndex ()) - (Numbars / Hts), RI, colorViolet) PlotText (S2. LastValue (BarIndex ()) - (numbars / Hts), S2I, colorViolet) PlotText (R3. LastValue (BarIndex) ) PlotText (S3 LastValue (BarIndex ()) - (numbars / Hts), S3I, colorViolet) // Níveis de Camerilla // H5DayC1.1rg H5I LastValue (H5,1) H4DayC1.1rg / 2 H4I LastValue (H4,1) H3DayC1.1rg / 4 H3I LastValue (H3,1) H2DayC1.1rg / 6 H2I LastValue (H2.1) H1DayC1.1rg / 12 H1I LastValue (H1,1) L1DayC-1.1rg / 12 L1I LastValue (L1,1) L2DayC -1.1rg / 6 L2I LastValue (L2,1) L3DayC-1.1rg / 4 L3I LastValue (L3,1) L4DayC-1.1rg / 2 L4I LastValue (L4,1) L5DayC-1.1rg L5I LastValue (L5,1) pcl ParamToggle (Níveis Camerilla, MostrarEsconder, 0) if (PCL1) Plot (H5, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (H4, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (H3, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (H2, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (H1, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (L1,, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (L2, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (L3, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (L4, colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot (L5, colorRose , StyleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText (H5. (Última modificação) - (numbars / Hts), H5I 0.05, colorRose) PlotText (H3. LastValue (BarIndex ()) - (numbars / Hts) (Numbars / Hts), H2I 0.05, colorRose) PlotText (H1. LastValue (BarIndex ()) - (numbars / Hts), H3I 0.05, , L1I 0.05, colorRose) PlotText (L2. LastValue (BarIndex ()) - (numbars / Hts), L2I 0.05, colorRose) PlotText (L3. LastValue (BarIndex ()) - (numbars / Hts), L4I 0.05, colorRose) PlotText (L5. LastValue () () () () () () () () () () () () () () () () 085959 isdRth TimeNum () gt 084500 amp TimeNum () lt 160000 aRthL IIf (isRth, L, 1000000) aRthH IIf (isdRth, H, Null) aRthLd IIf (isdRth, L, 1000000) DayH TimeFrameCompress (aRthH, inDaily, compressHigh) DayH TimeFrameExpand (DayH, inDaily, expandFirst) DayL TimeFrameCompress (aRthLd, inDaily, compressLow) DayL TimeFrameExpand (DayL, inDaily, expandFirst) BarrasSince (TimeNum () gt 94500 E TimeNum () lt 095959) // BarIndex () // AND DateNum () LastValue (DateNum ()) x0 BarCount-LastValue (Barras) x1 BarCount-1 DayHlineLineArray (x0, LastValue (DayH), x1, LastValue (DayH), 0) DayLlineLineArray (x0, LastValue (DayL) (DayLline, DayH, colorYellow, styleBarstyleNoRescalestyleNoTitle) Lote (DayLline, DayL, colorYellow, styleBarstyleNoRescalestyleNoTitle) PlotText (Dia Oi. LastValue (BarIndex ()) - (numbars / Hts), DayLlineI 0.05, colorYellow) // Níveis de suporte e resistência usando RSI. // graham Kavanagh May 2003 // Carregar no Indicator Builder // A sensibilidade dos níveis pode ser alterada com as variáveis ​​// Pode testar diferentes números vivos com a função Param ctrl-R com painel aberto RSIperiod 5 // Param (RSI p, 3,14,30,1) Percentagem 5 // Param (ZIG, 8,9,15,1) EMAperíodo 5 // Param (EMA p, 4,5,10,1) HHVperíodo 5 // Param (HHV p, 3,5,10,1) NumLine 1 // Param (Linhas Num, 3,1,20,1) para (i 1 i lt numline i) ResBase LastValue (Pico (Base, Porcentagem, i)) SupBase LastValue (Trough (Base, Percent, i)) Plot (ValueBase, LLV (L, HHVperiod)), Nível de Suporte, colorGreen, styleDashed) Níveis de resistência do amplificador de suporte usando RSI: / EncodeColor (colorGreen) Níveis de suporte são verdes EncodeColor (colorRed) Os níveis de resistência são vermelhos: EncodeColor (colorBlack) / linhas numéricas WriteVal (numline, 1) P6Param (Trailing Stop Razão, 2,5,2,3,5,0,1) P7Param (Trailing Parar LookBack, 14,5,25,1) P8Param (Trailing Stop PrevLow Interruptor, 0,0,1,1) PrevLowIIf (P81, Ref (C, - TroughBars C, 5,1)), Nulo) Plot (PrevLow ,, colorRed) // Posicionamento dimensionamento // MyTotalPort Param (MyTotalPort, 1000000,10000,10000000,100000) AceitávelRisk Param (AcceptableRisk, 0,5,0,1,3,0,1) BarsFromStart BarsSince (Ref (PK, -1)) E Ref (Color, -1) colorRed) InitialStopLoss Ref (H - P6ATR (P7), - BarsFromStart) PositionSizing 0.01AcceptableRiskMyTotalPort / (C - InitialStopLoss) HHV (H-P6ATR (P7), BarsFromStart1) ltC, HHV (H - P6ATR (P7), BarsFromStart1), null), colorCustom12,1) SetChartOptions (0, chartShowArrowschartShowDates) N (Title StrFormat (- - EncodeColor (colorYellow) Open EncodeColor (colorYellow) g EncodeColor (colorBrightGreen) EncodeColor (colorBrightGreen) g EncodeColor (colorRed) Baixo EncodeColor (colorRed) g EncodeColor (colorYellow) Fechar EncodeColor (colorYellow) g (.1f) Vol WriteVal (V, 1.0) Hd, L, C, SelectedValue (ROC (C, 1)))) Odd13 // entrar Apenas números ímpar CoefOddround (Odd / 2) Even12 // inserir apenas números pares CoefevenEven / 2 Coefeven2Coefeven1 CongestionPercent2.8 / Set above / below Moving Média para o congestionamento / mercado lateral / finalMovavgIIf (Odd gt even, triangularOdd, TriangularEven) ColorcolorBrightGreen // select Cor da linha média móvel tickercolorcolorBlack // selecione a cor do preço Plot (finalMovavg ,, IIf (C lt finalmovavg, colorRed, Color), styleDotsstyleThick) Código Para identificar automaticamente os pivôs TRIANGLE / // - qual será o nosso intervalo de lookback para o hh e o farbackParam (para onde ir para trás, 200,12,30,1) nBars Param (Número de barras, 12, 1, 30, 1) // - Criar arrays 0-inicializados do tamanho de barcount aHPivs H - H aLPivs L - L // - 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 nHPivs 0 nLPivs 0 lastHPIdx 0 lastLPIdx 0 lastHPH 0 lastLPL 0 curPivBarIdx 0 // - olhando para trás da barra atual, quantas barras // volta eram os valores hhv e llv das barras // n anteriores, etc. AHHVBars HHVBars (H, nBars) aLLVBars LLVBars (L, nBars) aHHV HHV (H, nBars) aLLV LLV (L, nBars) // - Gostaria de configurar isso para que os pivôs sejam calculados de volta de // última barra visível para Torná-lo fácil de voltar e ver os pivôs // este código iria encontrar. No entanto, a primeira instância de // Trace output mostrará um valor de 0 aVisBars Status (barvisible) nLastVisBar LastValue (Highest (IIf (aVisBars, BarIndex (), 0)) TRACE (Última barra visível: nLastVisBar) Inicialize o valor de curTrend curBar (BarCount-1) curTrend se (aLLVBarscurBar lt aHHVBarscurBar) curTrend D else curTrend U // - Loop através de barras. Busca por // abordagem inteiramente baseada em matriz // na versão futura para (i0 iltfarback i) curBar (BarCount - 1) - i // - Identificamos um pivô Se a tendência estiver baixa. If (aLLVBarscurBar lt aHHVBarscurBar) //. e tinha sido, esta é uma mudança de tendência if (curTrend U) curTrend D // - Captura de informações pivot curPivBarIdx Curbar - aLLVBarscurBar aLPivscurPivBarIdx 1 aLPivLowsnLPivs LcurPivBarIdx aLPivIdxsnLPivs curPivBarIdx nLPivs // - ou tendência atual é de até else if (curTrend D) CurTrend U curPivBarIdx curBar - aHHVBarscurBar aHPivscurPivBarIdx 1 aHPivHighsnHPivs HcurPivBarIdx aHPivIdxsnHPivs curPivBarIdx nHPivs // - Se curTrend está para cima. outro. // - loop through bars // - Tentativa básica de adicionar um pivô que essa lógica pode ter perdido // - OK, agora eu quero olhar os últimos dois pivôs. Se o mais // recente pivô baixo estiver após o último nível, eu poderia // ainda ter um pivô alto que eu não peguei // - Comece na última barra curBar (BarCount-1) candIdx 0 candPrc 0 lastLPIdx aLPivIdxs0 lastLPL aLPivLows0 lastHPIdx aHPivIdxs0 lastHPH aHPivHighs0 if (lastLPIdx gt lastHPIdx) // - Bar e sobre o preço de pivot candidato candIdx Curbar - aHHVBarscurBar candPrc aHHVcurBar if (lastHPH lt candPrc e candIdx gt lastLPIdx e candIdx lt Curbar) // - OK, bem adicioná-lo como Um pivô. AHPivscandIdx 1 //. e depois reorganizar elementos nas matrizes // informação pivô para (j0 jltnHPivs j) aHPivHighsnHPivs-j aHPivHighsnHPivs - (J1) aHPivIdxsnHPivs-j aHPivIdxsnHPivs - (J1) aHPivHighs0 candPrc aHPivIdxs0 candIdx nHPivs else // - Bar e sobre o preço de pivot candidato CandIdx curBar - aLLVBarscurBar candPrc aLLVcurBar se (lastLPL gt candPrc E candIdx gt lastHPIdx E candIdx lt curBar) // - OK, bem adicione isso como um pivô. ALPivscandIdx 1 //. e depois reorganizar elementos nas matrizes // informação pivô para (j0 jltnLPivs j) aLPivLowsnLPivs-j aLPivLowsnLPivs - (J1) aLPivIdxsnLPivs-j aLPivIdxsnLPivs - (J1) aLPivLows0 candPrc aLPivIdxs0 candIdx nLPivs // - Camião inventário de altas pivôs para depuração / Para (k0 kltnHPivs k) TRACE (Alto ponto de pivô k no barindex: aHPivIdxsk, WriteVal (ValueWhen (BarIndex () aHPivIdxsk, DateTime (), 1), formatDateTime) Usando as setas PlotShapes (IIf (aHPivs1, shapeSmallDownTriangle, shapeNone), colorCustom12, 0, High, Offset-5) PlotShapes (IIF (aLPivs1, shapeSmallUpTriangle. ShapeNone), colorCustom11, 0, Low, Offset-5) Venda aHPivs 1 Buy aLPivs 1 FilterBuy OU Vender SellExRem (Vender, Comprar) BuyExRem (Compra, Venda) Código para identificar automaticamente pivôs para STAR // - qual será a nossa gama de lookback para o hh e ll farbackParam (Quanto tempo atrás, 200,0,5000 , 10) nBars Param (Número de barras, 12, 5, 40) // - Criar arrays 0 inicializados com o tamanho de barcount // - OK, permite plotar os pivôs usando as setas IIf (aHPivs1, shapeStar, shapeNone) ColorBrightGreen, 0, H, 15) IIf (aLPivs1, formaStar. (Parada de Perda, ShowHide, 0) no10 resHHV (H, não) supLLV (L, não) avdIIf (CgtRef (0, L, -20) ParamToggle Res, -1), 1, IIf (CltRef (sup, -1), - 1,0)) avnValueQuando (avd0, avd, 1) s5dIIf (avn1, sup, res) S5d, H) PlotShapes (exitlong shapeDownArrow, colorBlack, 0, H, -10) exitshort Cruz (L, s5d) PlotShapes (exitshort shapeUpArrow, colorBlack, 0, L, -15) Comprar ExRem (Comprar, Vender) Vender ExRem (Vender, Comprar) // Short ExRem (Short, Cover) // Cover ExRem (Cover, Short) AlertIf (Buy,, BUY C, , 2) para (iBarCount-1igt1i--) if (Buyi 1) entrada Ci sig BUY sl s5di entrada tar1 (entrada .0056) entrada tar2 (entrada .0116) tar3 entrada (entrada .0216) barras ii 0 se (Selli 1 ) SELL entrada Ci sl s5di entrada tar1 - (entrada .0056) tar2 entrada - (entrada .0116) tar3 entrada - (entrada .0216) barras ii 0 Deslocamento 20 Clr IIf (sig BUY, colorLime, colorRed) ssl IIf (LineArray (barras-Offset, tar1, BarCount, tar1,1),, Clr, styleLinestyleDots, Nulo, Nulo, Offset) Plot (Parâmetros de BarCount-1, s5dBarCount-1, Ref (s5d, -1) LineArray (barras-Offset, tar3, BarCount, tar3,1),, Clr, styleLinestyleDots, Null, Null, Offset) Plot (LineArray (barras-Offset, sl, BarCount, sl, 1),, colorDarkRed, styleLinestyleLine, Null, PlotText (sigentry, BarCount1, entrada, Null, colorBlue) PlotText (T1tar1, BarCount3, tar1, Null, Clr) PlotText (T2tar2, BarCount3, tar2, Null, Clr) PlotText (T3tar3, BarCount3, tar3, Null, Clr) printf (O último sig O sinal veio (BarCount-bars) atrás) printf (n sig. Entrada nStop Perda. Sl (WriteVal (IIf (sig VENDA, entry-sl, sl-entry), 2.2)) nTarget1. Tar1 nTarget2. Tar2 nTarget3. Tar3) printf (nCurrent P / L. WriteVal (IIf (sig BUY, (entrada C), (entrada-C)), 2.2)) if (messageboard 0) GfxSelectFont (Tahoma, 13, 100) GfxSetTextColor (ColorBlue) // esta é a cor de fundo da caixa mais GfxSelectSolidBrush (colorRed) // esta é a cor de fundo da caixa pxHeight Status (pxchartheight) xx Status (pxchartwidth) Esquerda 1100 largura 310 x 5 x2 GfxSelectPen (colorGreen, 1) // GfxRoundRect (x, y - 163, x2, y. 7, 7) GfxTextOut (GAIN TRADE), 88, y-165 GfxTextOut (), 27, y-160 ) GfxTextOut ((O último sinal de sig veio (BarCount-bars-1) Intervalo () / 60 mins atrás), 13, y-140) // A localização do formato de texto GfxTextOut (WriteIf (sig BUY, sig, sig). ), 13, y-120) GfxTextOut ((Trailing SL. sl (WriteVal (IIf (sig SELL, entry-sl, sl-entry) Tar1), 13, y-80) GfxTextOut ((TGT: 2 tar2), 13, y-60) GfxTextOut ((TGT: 3 tar3), 13, y-40) GfxTextOut ((Current P / L. WriteVal (IIf (sig BUY, (entrada C), (entrada-C)), 2,2)), 88, y-22) SECTIONBEGIN (Magnified Market Price) // por Vidyasagar, vkunisetty // FSParam (Font Size, 30 GfxSetTextColor (ParamColor (Color, colorYellow)) HorParam (Posição Horizontal, 800.800.800.800) VerParam (Posição Vertical, 27, 27, 30, 100,1) GfxSelectFont (Arial, FS, 900, itálico Falso, sublinhado Falso, 27,27) GfxTextOut (C, Hor. Ver) YCTimeFrameGetPrice (C, inDaily, -1) DDPrec (C-YC, 2) xxPrec ((DD / YC) 100,2) GfxSelectFont (Arial, 12, 700 Falso , Sublinhado Falso, Verdadeiro) GfxSetBkMode (colorWhite) GfxSetTextColor (ParamColor (Cor, colorYellow)) GfxTextOut (DD (xx), Hor5, Ver45) SECÇÃO SEÇÃOBEGIN (trending ribbon) uptrendPDI () gtMDI ) DowntrendMDI () gtPDI () E Sinal () gtMACD () Plot (2, / define a altura da fita em percentagem de largura de painel / ribbon, IIf (tendência de alta, colorGreen, IIf (tendência de baixa, colorRed, colorBlack) Escolha color / styleOwnScalestyleAreastyleNoLabel, -0.5, 100) SECÇÃOEND () GraphXSpace5 Nishant Trading System V2.0.afl Autor. Nishant Kulkarni (nishantndk) Visita. Www. myinvestmentmanager para pontas do investimento no mercado indiano. SetChartOptions (0, chartShowArrowschartShowDates) fração IIf (StrRight (Name (), 3), 3.2, 3.2) tchoiceParam (Seleção de título, 2,1,2,1) ZigLevel Param (ZigLevel, 2, 1, 25) numbars LastValue (Status (barvisible))) hts Parâmetro (Shift de texto, -33,5, -50,50,0,10) dec (Param (Decimal, 2,0,7,1) / 10) 1 bi BarIndex () Lbi LastValue (BarIndex )) Sbi SelectedValue (bi) ScanLookBack Função Param (Scan Lookback, 1, 1, 25) Lastthursday () DaysinmonthIIf (Mês () 1 OU Mês () 3 OU Mês () 5 OU Mês () 7 OU Mês Mês () 10 OU Mês () 12,31,30) Dias no mês (ano) 4 0 E Ano () 1000,29,28) Dias no final do mês () 2, Dias no mês, dias no mês) (Day) () 4,1,0) return returnvalue SEÇÃOBEGIN (Preço) N (Título StrFormat (- Abrir g, Hi g, Lo g, Fechar g (.1f) Vol WriteVal (V, 1,0), O, H, L (C, 1))) Plot (C, DEFAULTNAME (), colorBlack. StyleNoTitle ParamStyle (Estilo) GetPriceStyle ()) SET Param (campo de preço, -1) Períodos Param (Períodos, 15, 2, 100, 1) Parâmetro de Largura (Largura, 2, 0, 10, 0,05) Cor ParamColor (Cor, colorLightGrey) Estilo Estilo de ParamStilo (Estilo) EstiloNãoRescala EstiloNoTitle BBTop BBandTop (P, Períodos, Largura) BBBot BBandBot (P, , Largura) BBMid MA (C, 20) Plot (BBTop. BBTop PARAMVALUES (), Cor, Estilo) LOTE (BBBot, BBBot PARAMVALUES (), Cor, Estilo) SECTIONBEGIN (Linha de tendência de auto linha de tendência) Porcentagem 0.01 1 / Ajustar esta percentagem se necessário, / firstpointL 2 firstpointH 2 for (i 1 i lt (L, percent, firstpointL)) x0BarCount - 1 - LastValue (TroughBars (L, por cento, firstpointL)) x1BarCount - 1 - LastValue (TroughBars (Ref (L, -1) (LineL, Support, colorGreen, styleLine styleDots styleNoTitle styleNoRescale) para (i 1 i lt BarCount E yt0 lt yt1 i) firstpointH yt0LastValue (Pico (H ,%, FirstpointH)) xt0BarCount - 1 - LastValue (PeakBars (H, por cento, firstpointH)) xt1BarCount - 1 - LastValue (PeakBars (Ref (H, -1) , Yt1, 1) Plot (LineH, Resistance, colorBrown, styleLine styleDots styleNoTitle styleNoRescale) ATBuy Cross (C, LineH) ATShort Cross (LineL, C) PlotShapes (ATBuy shapeUpTriangle. colorBlue, 0, L) PlotShapes (ATShort shapeDownTriangle. (K, 1,5, 1, 5, 0,1) Por Param (ATR, 14, 1, 30, 0,50) rfsctor WMA (HL, Per) 1, 27, 4), estiloStaircase styleNoRescale) NMBuy NMCover Cross (j, nw) NMSell Cruz NMShort (nw, j) baratnwbuy LastValue (ValueWhen ((NMBuy), BarIndex ())) baratnwshort LastValue (ValueWhen ((NMShort), BarIndex (),) () () () () () () () () () () () () () () () () Forma NMBuy shapeSmallUpTriangle NMSell shapeSmallDownTriangle PlotShapes (forma, IIf (NMBuy, colorRed, colorBlue) , StyleOwnScalestyleAreastyleNoLabelstyleNoTitle, -0.5, 100) Comprar NMBuy E ATBuy curto NMShort E ATShort baratbuy LastValue (ValueWhen ((Comprar), BarIndex ())) baratshort LastValue (ValueWhen ((Curto), BarIndex ())) T1 T2 T3 T4 T5 T6 SL 0 if (baratbuy gt baratshort) TP Máx (NWbaratbuy-1, LineHbaratbuy) HV yt0 LV y0 PlotText (Entrada Longa WriteVal (BuyPrice, fração), LastValue (BarIndex ()), BuyPrice 0,05, colorRed) T1 TP (TP-LV) 0,618 T2 TP (TP-LV) 1,0 T3 TP (TP-LV) 1,682 T4 TP (TP-LV) 2,618 T5 TP (TP-LV) 2,620 PlotText S / L WriteVal (SL, fração), LastValue (BarIndex ()) - (numbars / hts), SL 0,05, colorBlue) PlotText (T1 WriteVal , T1 0.05, colorBlue) PlotText (T3 WriteVal (T3, fração), LastValue (BarIndex ()) - (numbars / hts), T2 0.05, colorBlue) T5 WriteVal (T5, fração), LastValue (BarIndex ()) - (numbars / hts), T3 0.05, colorBlue) PlotText (T4 WriteVal (T6, fração), LastValue (BarIndex ()) - (numbars / hts), T6 0,05, colorBlue) else if (baratshort Gt baratbuy) TP Min (NWbaratshort-1, LineLBaratshort) HV yt0 LV y0 PlotText (Short Entry WriteVal (ShortPrice, fração), LastValue (BarIndex ()) - (numbars / hts), ShortPrice 0,05, colorRed) T1 TP - PT-TP) 0,618 T2 TP - (HV-TP) 1,0 T3 TP - (HV-TP) 1,682 T4 TP - (HV-TP) 2,618 T5 TP - (HV-TP) 2,620 PlotText (S / L WriteVal (SL fração), LastValue (BarIndex ()) - (numbars / hts), SL 0,05, colorBlue) PlotText (T1 WriteVal (T1, fração), LastValue (BarIndex ), T1 0.05, colorBlue) PlotText (T3 WriteVal (T3, fração), LastValue (BarIndex ()) - (numbars / hts), T2 0.05, colorBlue) ), (T5, fração), T4 0,05, colorBlue) PlotText (T4 WriteVal (T4, fração), LastValue (BarIndex ()) - (numbars / hts) (T6, fração), LastValue (BarIndex ()) - (numbars / hts), T6 0,05, colorBlue) Comprar (Comprar ) E BarIndex () baratbuy E (BarCount - baratbuy) ltScanLookBack Curto (Curto) E BarIndex () baratshort E (BarCount - baratshort) ltScanLookBack Filtro Comprar OU Curta Var WriteIf (Buy, LONG, WriteIf (Buy, BuyPrice, ShortPrice) AddTextColumn (Var. Long / Curto, 1.2. ColorBlack, IIf (Buy, colorLime, IIf (Short, colorOrange, colorWhite))) AddColumn (EntryPrice. Preço, 1.2, colorBlack, IIf (Buy, colorLime, IIf (Short, colorOrange, colorWhite)))) ColunaAdicionar (SL, S / L, 1.2, colorBlack, IIf AddColumn (T2, T2.1.2, colorBlack, IIf (Buy, colorLime, IIf (Short, colorOrange, colorWhite)) AdicionarColumn (T1, T1.1.2, colorBlack, IIf )) AddColumn (T4, T4.1.2, colorBlack, IIf (Buy, colorLime, IIf (Short, colorOrange, IIf, ColorBlack, IIf (Buy, colorLime, IIf (Short, colorOrange, colorWhite))) AddColumn (T5, T5.1.2, colorBlack, IIf GFxSetOverlayMode (0) GfxSelectFont (Arial, Status (pxheight) / 28) GfxSetTextAlign (6, 6, 6, 6, 6, 6) ) // Alinhamento central GfxSetTextColor (ColorHSB (42, 42, 42)) GfxSetBkMode (0) // transparente GfxTextOut (Nome (), Status (pxwidth) / 2, Status (pxheight) / 12) GfxSelectFont (Tahoma, Status )/30 ) Title EncodeColor(colorBlue)Author: Traderji(www. amibroker) EncodeColor(colorBlack)Title SECTIONEND() SECTIONBEGIN(BackgroundSetting) SetChartBkGradientFill( ParamColor(BgTop, colorCustom14), SECTIONBEGIN(Price) SetChartOptions(0,chartShowArrowschartShowDates) N( Title StrFormat( - Open g, Hi g, Lo g, Close g (.1f) , O, H, L, C, SelectedValue( ROC( C, 1 ) ) )) Plot( C, Close, ParamColor(Color, colorBlack ), styleNoTitle ParamStyle(Style) GetPriceStyle() ) SECTIONEND() SECTIONBEGIN(DispMA) P ParamField(Field) Type ParamList(Type, Simple, Exponential, Double Exponential, Tripple Exponential, Wilders, Weighted) Periods Param(Periods, 30, 2 , 300 ) Displacement Param(Displacement, 15, -50, 50 ) m 0 if( Type Simple ) m MA( P, Periods ) if( Type Exponential ) m EMA( P, Periods ) if( Type Double Exponential ) m DEMA( P, Periods ) if( Type Tripple Exponential ) m TEMA( P, Periods ) if( Type Wilders ) m Wilders( P, Periods ) if( Type Weighted ) m WMA( P, Periods ) Plot( m, DEFAULTNAME(), ParamColor (Color, ColorCycle), ParamStyle(Style), 0, 0, Displacement ) SECTIONEND() SECTIONBEGIN(EMA1) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(EMA2) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(EMA3) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(Price) SetChartOptions(0,chartShowArrowschartShowDates) N( Title StrFormat( - Open g, Hi g, Lo g, Close g (.1f) , O, H, L, C, SelectedValue( ROC( C, 1 ) ) )) Plot( C, Close, ParamColor(Color, colorBlack ), styleNoTitle ParamStyle(Style) GetPriceStyle() ) SECTIONEND() SECTIONBEGIN(DispMA) P ParamField(Field) Type ParamList(Type, Simple, Exponential, Double Exponential, Tripple Exponential, Wilders, Weighted) Periods Param(Periods, 30, 2 , 300 ) Displacement Param(Displacement, 15, -50, 50 ) m 0 if( Type Simple ) m MA( P, Periods ) if( Type Exponential ) m EMA( P, Periods ) if( Type Double Exponential ) m DEMA( P, Periods ) if( Type Tripple Exponential ) m TEMA( P, Periods ) if( Type Wilders ) m Wilders( P, Periods ) if( Type Weighted ) m WMA( P, Periods ) Plot( m, DEFAULTNAME(), ParamColor (Color, ColorCycle), ParamStyle(Style), 0, 0, Displacement ) SECTIONEND() SECTIONBEGIN(EMA1) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(EMA2) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(EMA3) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() PKIIf(PctVltlt0.5,Peak(Close,0.5, 1), IIf( PctVltgt0.5 AND PctVltlt 1.0,Peak(Close,0.70,1), IIf( PctVltgt1.0 AND PctVltlt 1.5,Peak(Close,0.90,1), IIf( PctVltgt1.5 AND PctVltlt 2.0,Peak( Close,1.10,1), IIf( PctVltgt2.0 AND PctVltlt 2.5,Peak(Close,1.30,1), IIf( PctVltgt2.5 AND PctVltlt 3.0,Peak(Close,1.50,1), IIf( PctVltgt3.0 AND PctVltlt 3.5,Peak(Close,1.70,1), IIf( PctVltgt3.5 AND PctVltlt 4.0,Peak(Close,2.00,1), Peak(Close,2.20,1) )))))))) TGHIIf(PctVltlt0.5,Trough(Close,0.5,1), IIf( PctVltgt0.5 AND PctVltlt 1.0,Trough(Close,0.75,1), IIf( PctVltgt1.0 AND PctVltlt 1.5,Trough(Close,1.00,1), IIf( PctVltgt1. 5 AND PctVltlt 2.0,Trough(Close,1.25,1), IIf( PctVltgt2.0 AND PctVltlt 2.5,Trough(Close,1.50,1), IIf( PctVltgt2.5 AND PctVltlt 3.0,Trough(Close,1.75,1), IIf( PctVltgt3.0 AND PctVltlt 3.5,Trough(Close,2.00,1), IIf( PctVltgt3.5 AND PctVltlt 4.0,Trough(Close,2.25,1), Trough(Close,2.50,1) )))))) )) SensIIf(PctVltlt0.5,0.5, IIf( PctVltgt0.5 AND PctVltlt 1.0 ,0.75, IIf( PctVltgt1.0 AND PctVltlt 1.5 ,1.00, IIf( PctVltgt1.5 AND PctVltlt 2.0 ,1.25, IIf( PctVltgt2.0 AND PctVltlt 2.5 ,1.50, IIf( PctVltgt2.5 AND PctVltlt 3.0 ,1.75, IIf( PctVltgt3.0 AND PctVltlt 3.5 ,2.00, IIf( PctVltgt3.5 AND PctVltlt 4.0 ,2.25, 2.50 )))))))) ColorIIf(BarsSince( Cross(C, Ref(PK,-1)))ltBarsSince(Cross(Ref(TGH,-1),C)),colorBrightGreen, colorRed) Plot(C, Chaloke Peak-Trough, Color, styleCandle) acc Param(Acceleration , 0.1, 0, 1, 0.001 ) accm Param(Max. acceleration, 0.06, 0, 1, 0.001 ) Buy Cross(Open, SAR(acc, accm)) Sell Cross(SAR(acc, accm), Open ) PlotShapes(IIf(Buy, shapeUpArrow, shapeNone), colorYellow, 0, Low, Offset-15) PlotShapes(IIf(Buy, shapeSmallCircle, shapeNone), colorYellow, 0, Low, Offset-28) PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorWhite, 0, High, Offset-15) PlotShapes(IIf(Sell, shapeSmallCircle, shapeNone), colorWhite, 0, High, Offset 28) DayH TimeFrameGetPrice(H, inDaily, -1) DayHI LastValue (DayH,1)// yesterdays high DayL TimeFrameGetPrice(L, inDaily, -1) DayLI LastValue (DayL,1) // yesterdays low DayC TimeFrameGetPrice(C, inDaily, -1) // yesterdays close DayO TimeFrameGetPrice(O, inDaily) // current day open DayH2 TimeFrameGetPrice(H, inDaily, -2) DayH2I LastValue (DayH2,1) // Two days before high DayL2 TimeFrameGetPrice(L, inDaily, -2) DayL2I LastValue (DayL2,1) // Two days before low DayH3 TimeFrameGetPrice(H, inDaily, -3) DayH3I LastValue (DayH3,1) // Three days before high DayL3 TimeFrameGetPrice(L, inDaily, -3) DayL3I LastValue (DayL3,1) // Three days before low numbars LastValue(Cum(Status(barvisible))) hts -33.5 YHL ParamToggle(Yesterday HI LO, ShowHide,1) if(YHL1) Plot(DayL, YL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(DayH, YH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText( YH . LastValue(BarIndex())-(numbars/Hts), DayHI, colorTurquoise) PlotText( YL . LastValue(BarIndex())-(numbars/Hts), DayLI, colorTurquoise) TDBHL ParamToggle(2/3Days before HI LO, ShowHide,0) if(TDBHL1) Plot(DayL2,2DBL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(DayH2,2DBH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(DayL3,3DBL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(DayH3,3DBH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText( 2DBH . LastValue(BarIndex())-(numbars/Hts), DayH2I, colorTurquoise) PlotText( 2DBL . LastValue(BarIndex())-(numbars/Hts), DayL2I, colorTurquoise) PlotText( 3DBH . LastValue(BarIndex())-(numbars/Hts), DayH3I, colorTurquoise) PlotText( 3DBL . LastValue(BarIndex())-(numbars/Hts), DayL3I, colorTurquoise) // Pivot Levels // PP (DayL DayH DayC)/3 PPI LastValue (PP,1) // Pivot R1 (PP 2) - DayL R1I LastValue (R1,1) // Resistance 1 S1 (PP 2) - DayH S1I LastValue (S1,1) // Support 1 R2 PP R1 - S1 R2I LastValue (R2,1) // Resistance 2 S2 PP - R1 S1 S2I LastValue (S2,1) // Support 2 R3 PP R2 - S1 R3I LastValue (R3,1) // Resistance 3 S3 PP - R2 S1 S3I LastValue (S3,1) // Support 3 ppl ParamToggle(Pivot Levels, ShowHide,1) if(ppl1) Plot(PP, PP, colorYellow, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(R1, R1,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(S1, S1,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(R2, R2,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(S2, S2,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(R3, R3,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(S3, S3,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText( Pivot , LastValue(BarIndex())-(numbars/Hts), PPI, colorYellow) PlotText( R1 . LastValue(BarIndex())-(numbars/Hts), R1I, colorViolet) PlotText( S1 . LastValue(BarIndex())-(numbars/Hts), S1I, colorViolet) PlotText( R2 . LastValue(BarIndex())-(numbars/Hts), R2I, colorViolet) PlotText( S2 . LastValue(BarIndex())-(numbars/Hts), S2I, colorViolet) PlotText( R3 . LastValue(BarIndex())-(numbars/Hts), R3I, colorViolet) PlotText( S3 . LastValue(BarIndex())-(numbars/Hts), S3I, colorViolet) // Camerilla Levels // H5DayC1.1rg H5I LastValue (H5,1) H4DayC1.1rg/2 H4I LastValue (H4,1) H3DayC1.1rg/4 H3I LastValue (H3,1) H2DayC1.1rg/6 H2I LastValue (H2,1) H1DayC1.1rg/12 H1I LastValue (H1,1) L1DayC-1.1rg/12 L1I LastValue (L1,1) L2DayC-1.1rg/6 L2I LastValue (L2,1) L3DayC-1.1rg/4 L3I LastValue (L3,1) L4DayC-1.1rg/2 L4I LastValue (L4,1) L5DayC-1.1rg L5I LastValue (L5,1) pcl ParamToggle(Camerilla Levels, ShowHide,0) if(pcl1) Plot(H5,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(H4,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(H3,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(H2,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(H1,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L1,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L2,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L3,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L4,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L5,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText( H5 . LastValue(BarIndex())-(numbars/Hts), H5I 0.05, colorRose) PlotText( H4 . LastValue(BarIndex())-(numbars/Hts), H4I 0.05, colorRose) PlotText( H3 . LastValue(BarIndex())-(numbars/Hts), H3I 0.05, colorRose) PlotText( H2 . LastValue(BarIndex())-(numbars/Hts), H2I 0.05, colorRose) PlotText( H1 . LastValue(BarIndex())-(numbars/Hts), H1I 0.05, colorRose) PlotText( L1 . LastValue(BarIndex())-(numbars/Hts), L1I 0.05, colorRose) PlotText( L2 . LastValue(BarIndex())-(numbars/Hts), L2I 0.05, colorRose) PlotText( L3 . LastValue(BarIndex())-(numbars/Hts), L3I 0.05, colorRose) PlotText( L4 . LastValue(BarIndex())-(numbars/Hts), L4I 0.05, colorRose) PlotText( L5 . LastValue(BarIndex())-(numbars/Hts), L5I 0.05, colorRose) // Current Days Hi Lo // THL ParamToggle(Todays Hi Lo, ShowHide,1) if(THL1) isRth TimeNum() gt 084500 amp TimeNum() lt 085959 isdRth TimeNum() gt 084500 amp TimeNum() lt 160000 aRthL IIf(isRth, L, 1000000) aRthH IIf(isdRth, H, Null) aRthLd IIf(isdRth, L, 1000000) DayH TimeFrameCompress( aRthH, inDaily, compressHigh ) DayH TimeFrameExpand( DayH, inDaily, expandFirst ) DayL TimeFrameCompress( aRthLd, inDaily, compressLow ) DayL TimeFrameExpand( DayL, inDaily, expandFirst ) Bars BarsSince(TimeNum() gt 94500 AND TimeNum() lt 095959)//,BarIndex(),1) // AND DateNum()LastValue(DateNum()) x0 BarCount-LastValue(Bars) x1 BarCount-1 DayHlineLineArray(x0,LastValue(DayH),x1,LastValue (DayH),0) DayLlineLineArray(x0,LastValue(DayL),x1,LastValue (DayL),0) DayHlineI LastValue (DayHline,1) DayLlineI LastValue (DayLline,1) Plot(DayHline, DayH, colorYellow, styleBarstyleNoRescalestyleNoTitle) Plot(DayLline, DayL, colorYellow, styleBarstyleNoRescalestyleNoTitle) PlotText( Day Hi . LastValue(BarIndex())-(numbars/Hts), DayHlineI 0.05, colorYellow) PlotText( Day Lo . LastValue(BarIndex())-(numbars/Hts), DayLlineI 0.05, colorYellow) //Support and resistance levels using RSI. //graham Kavanagh May 2003 //Load into Indicator Builder //Sensitivity of the levels can be changed with the variables //Can test different numbers live with the Param function ctrl-R with open pane RSIperiod 5 // Param(RSI p,3,14,30,1) Percent 5 // Param(ZIG ,8,9,15,1) EMAperiod 5 //Param(EMA p,4,5,10,1) HHVperiod 5 //Param(HHV p,3,5,10,1) NumLine 1 //Param(Num Lines,3,1,20,1) for( i 1 i lt numline i ) ResBase LastValue(Peak(Base, Percent, i)) SupBase LastValue(Trough(Base, Percent, i)) Plot(ValueWhen( ResBaseBase, HHV(H, HHVperiod) ), Resist Level, colorRed, styleDashed) Plot(ValueWhen( supbaseBase, LLV(L, HHVperiod) ), Support Level, colorGreen, styleDashed) Title Name() Date() : Support amp Resistance Levels using RSI: /EncodeColor(colorGreen) Support Levels are Green EncodeColor(colorRed) Resistance Levels are Red: EncodeColor(colorBlack)/ Num lines WriteVal(numline,1) P6Param(Trailing Stop Risk,2.5,2,3.5,0.1) P7Param(Trailing Stop LookBack,14,5,25,1) P8Param(Trailing Stop PrevLow Switch,0,0,1,1) PrevLowIIf(P81, Ref(C,-TroughBars(C,5,1)),Null) Plot(PrevLow,,colorRed) //Position sizing// MyTotalPort Param(MyTotalPort,1000000,10000,10000000,100000) AcceptableRisk Param(AcceptableRisk,0.5,0.1,3,0.1) BarsFromStart BarsSince(Cross(C, Ref(PK,-1))AND Ref(Color,-1)colorRed) InitialStopLoss Ref( H - P6ATR(P7),-BarsFromStart) PositionSizing 0.01AcceptableRiskMyTotalPort/( C - InitialStopLoss ) Plot(IIf( HHV(H - P6ATR(P7),BarsFromStart1) ltC, HHV(H - P6ATR(P7),BarsFromStart1),Null) ,,colorCustom12,1) SetChartOptions(0,chartShowArrowschartShowDates) N(Title StrFormat( - - EncodeColor(colorYellow)Open EncodeColor(colorYellow) g EncodeColor(colorBrightGreen)High EncodeColor(colorBrightGreen) g EncodeColor(colorRed)Low EncodeColor(colorRed) g EncodeColor(colorYellow) Close EncodeColor(colorYellow) g (.1f) Vol WriteVal( V, 1.0 ) , O, H, L, C, SelectedValue( ROC( C, 1 )) )) Odd13//enter Odd numbers only CoefOddround(Odd/2) Even12//enter Even numbers only CoefevenEven/2 Coefeven2Coefeven1 CongestionPercent2.8/Set above/below Moving average for congestion / sideways market/ finalMovavgIIf(Odd gt even, triangularOdd, TriangularEven) ColorcolorBrightGreen//select Moving average line color tickercolorcolorBlack//select price color Plot(finalMovavg,,IIf(C lt finalmovavg, colorRed, Color),styleDotsstyleThick) Code to automatically identify pivots TRIANGLE / // -- what will be our lookback range for the hh and ll farbackParam(How Far back to go,200,12,30,1) nBars Param(Number of bars, 12, 1, 30, 1) // -- Create 0-initialized arrays the size of barcount aHPivs H - H aLPivs L - L // -- More for future use, not necessary for basic plotting aHPivHighs H - H aLPivLows L - L aHPivIdxs H - H aLPivIdxs L - L nHPivs 0 nLPivs 0 lastHPIdx 0 lastLPIdx 0 lastHPH 0 lastLPL 0 curPivBarIdx 0 // -- looking back from the current bar, how many bars // back were the hhv and llv values of the previous // n bars, etc. aHHVBars HHVBars(H, nBars) aLLVBars LLVBars(L, nBars) aHHV HHV(H, nBars) aLLV LLV(L, nBars) // -- Would like to set this up so pivots are calculated back from // last visible bar to make it easy to go back and see the pivots // this code would find. However, the first instance of // Trace output will show a value of 0 aVisBars Status(barvisible) nLastVisBar LastValue(Highest(IIf(aVisBars, BarIndex(), 0))) TRACE(Last visible bar: nLastVisBar) // -- Initialize value of curTrend curBar (BarCount-1) curTrend if (aLLVBarscurBar lt aHHVBarscurBar) curTrend D else curTrend U // -- Loop through bars. Search for // entirely array-based approach // in future version for (i0 iltfarback i) curBar (BarCount - 1) - i // -- Have we identified a pivot If trend is down. if (aLLVBarscurBar lt aHHVBarscurBar) //. and had been up, this is a trend change if (curTrend U) curTrend D // -- Capture pivot information curPivBarIdx curBar - aLLVBarscurBar aLPivscurPivBarIdx 1 aLPivLowsnLPivs LcurPivBarIdx aLPivIdxsnLPivs curPivBarIdx nLPivs // -- or current trend is up else if (curTrend D) curTrend U curPivBarIdx curBar - aHHVBarscurBar aHPivscurPivBarIdx 1 aHPivHighsnHPivs HcurPivBarIdx aHPivIdxsnHPivs curPivBarIdx nHPivs // -- If curTrend is up. else. ) SECTIONBEGIN(Price) SetChartOptions(0,chartShowArrowschartShowDates) N(Title StrFormat( - Open g, Hi g, Lo g, Close g (.1f) , O, H, L, C, SelectedValue( ROC( C, 1 ) ) )) Plot( C, Close, ParamColor(Color, colorBlack ), styleNoTitle ParamStyle(Style) GetPriceStyle() ) SECTIONEND() SECTIONBEGIN(DispMA) P ParamField(Field) Type ParamList(Type, Simple, Exponential, Double Exponential, Tripple Exponential, Wilders, Weighted) Periods Param(Periods, 30, 2, 300 ) Displacement Param(Displacement, 15, -50, 50 ) m 0 if( Type Simple ) m MA( P, Periods ) if( Type Exponential ) m EMA( P, Periods ) if( Type Double Exponential ) m DEMA( P, Periods ) if( Type Tripple Exponential ) m TEMA( P, Periods ) if( Type Wilders ) m Wilders( P, Periods ) if( Type Weighted ) m WMA( P, Periods ) Plot( m, DEFAULTNAME(), ParamColor(Color, ColorCycle), ParamStyle(Style), 0, 0, Displacement ) SECTIONEND() SECTIONBEGIN(EMA1) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(EMA2) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(EMA3) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(Price) SetChartOptions(0,chartShowArrowschartShowDates) N(Title StrFormat( - Open g, Hi g, Lo g, Close g (.1f) , O, H, L, C, SelectedValue( ROC( C, 1 ) ) )) Plot( C, Close, ParamColor(Color, colorBlack ), styleNoTitle ParamStyle(Style) GetPriceStyle() ) SECTIONEND() SECTIONBEGIN(DispMA) P ParamField(Field) Type ParamList(Type, Simple, Exponential, Double Exponential, Tripple Exponential, Wilders, Weighted) Periods Param(Periods, 30, 2, 300 ) Displacement Param(Displacement, 15, -50, 50 ) m 0 if( Type Simple ) m MA( P, Periods ) if( Type Exponential ) m EMA( P, Periods ) if( Type Double Exponential ) m DEMA( P, Periods ) if( Type Tripple Exponential ) m TEMA( P, Periods ) if( Type Wilders ) m Wilders( P, Periods ) if( Type Weighted ) m WMA( P, Periods ) Plot( m, DEFAULTNAME(), ParamColor(Color, ColorCycle), ParamStyle(Style), 0, 0, Displacement ) SECTIONEND() SECTIONBEGIN(EMA1) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(EMA2) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() SECTIONBEGIN(EMA3) P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 300, 1, 10 ) Plot( EMA( P, Periods ), DEFAULTNAME(), ParamColor( Color, colorCycle ), ParamStyle(Style) ) SECTIONEND() PKIIf(PctVltlt0.5,Peak(Close,0.5,1), IIf( PctVltgt0.5 AND PctVltlt 1.0,Peak(Close,0.70,1), IIf( PctVltgt1.0 AND PctVltlt 1.5,Peak(Close,0.90,1), IIf( PctVltgt1.5 AND PctVltlt 2.0,Peak(Close,1.10,1), IIf( PctVltgt2.0 AND PctVltlt 2.5,Peak(Close,1.30,1), IIf( PctVltgt2.5 AND PctVltlt 3.0,Peak(Close,1.50,1), IIf( PctVltgt3.0 AND PctVltlt 3.5,Peak(Close,1.70,1), IIf( PctVltgt3.5 AND PctVltlt 4.0,Peak(Close,2.00,1), Peak(Close,2.20,1) )))))))) TGHIIf(PctVltlt0.5,Trough(Close,0.5,1), IIf( PctVltgt0.5 AND PctVltlt 1.0,Trough(Close,0.75,1), IIf( PctVltgt1.0 AND PctVltlt 1.5,Trough(Close,1.00,1), IIf( PctVltgt1.5 AND PctVltlt 2.0,Trough(Close,1.25,1), IIf( PctVltgt2.0 AND PctVltlt 2.5,Trough(Close,1.50,1), IIf( PctVltgt2.5 AND PctVltlt 3.0,Trough(Close,1.75,1), IIf( PctVltgt3.0 AND PctVltlt 3.5,Trough(Close,2.00,1), IIf( PctVltgt3.5 AND PctVltlt 4.0,Trough(Close,2.25,1), Trough(Close,2.50,1) )))))))) SensIIf(PctVltlt0.5,0.5, IIf( PctVltgt0.5 AND PctVltlt 1.0 ,0.75, IIf( PctVltgt1.0 AND PctVltlt 1.5 ,1.00, IIf( PctVltgt1.5 AND PctVltlt 2.0 ,1.25, IIf( PctVltgt2.0 AND PctVltlt 2.5 ,1.50, IIf( PctVltgt2.5 AND PctVltlt 3.0 ,1.75, IIf( PctVltgt3.0 AND PctVltlt 3.5 ,2.00, IIf( PctVltgt3.5 AND PctVltlt 4.0 ,2.25, 2.50 )))))))) ColorIIf(BarsSince(Cross(C, Ref(PK,-1)))ltBarsSince(Cross(Ref(TGH,-1),C)),colorBrightGreen, colorRed) Plot(C, Chaloke Peak-Trough, Color, styleCandle) acc Param(Acceleration, 0.1, 0, 1, 0.001 ) accm Param(Max. acceleration, 0.06, 0, 1, 0.001 ) Buy Cross(Open, SAR(acc, accm)) Sell Cross(SAR(acc, accm), Open ) PlotShapes(IIf(Buy, shapeUpArrow, shapeNone), colorYellow, 0, Low, Offset-15) PlotShapes(IIf(Buy, shapeSmallCircle, shapeNone), colorYellow, 0, Low, Offset-28) PlotShapes(IIf(Sell, shapeDownArrow, shapeNone), colorWhite, 0, High, Offset-15) PlotShapes(IIf(Sell, shapeSmallCircle, shapeNone), colorWhite, 0, High, Offset 28) DayH TimeFrameGetPrice(H, inDaily, -1) DayHI LastValue (DayH,1)// yesterdays high DayL TimeFrameGetPrice(L, inDaily, -1) DayLI LastValue (DayL,1) // yesterdays low DayC TimeFrameGetPrice(C, inDaily, -1) // yesterdays close DayO TimeFrameGetPrice(O, inDaily) // current day open DayH2 TimeFrameGetPrice(H, inDaily, -2) DayH2I LastValue (DayH2,1) // Two days before high DayL2 TimeFrameGetPrice(L, inDaily, -2) DayL2I LastValue (DayL2,1) // Two days before low DayH3 TimeFrameGetPrice(H, inDaily, -3) DayH3I LastValue (DayH3,1) // Three days before high DayL3 TimeFrameGetPrice(L, inDaily, -3) DayL3I LastValue (DayL3,1) // Three days before low numbars LastValue(Cum(Status(barvisible))) hts -33.5 YHL ParamToggle(Yesterday HI LO, ShowHide,1) if(YHL1) Plot(DayL, YL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(DayH, YH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText( YH . LastValue(BarIndex())-(numbars/Hts), DayHI, colorTurquoise) PlotText( YL . LastValue(BarIndex())-(numbars/Hts), DayLI, colorTurquoise) TDBHL ParamToggle(2/3Days before HI LO, ShowHide,0) if(TDBHL1) Plot(DayL2,2DBL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(DayH2,2DBH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(DayL3,3DBL, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(DayH3,3DBH, colorTurquoise, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText( 2DBH . LastValue(BarIndex())-(numbars/Hts), DayH2I, colorTurquoise) PlotText( 2DBL . LastValue(BarIndex())-(numbars/Hts), DayL2I, colorTurquoise) PlotText( 3DBH . LastValue(BarIndex())-(numbars/Hts), DayH3I, colorTurquoise) PlotText( 3DBL . LastValue(BarIndex())-(numbars/Hts), DayL3I, colorTurquoise) // Pivot Levels // PP (DayL DayH DayC)/3 PPI LastValue (PP,1) // Pivot R1 (PP 2) - DayL R1I LastValue (R1,1) // Resistance 1 S1 (PP 2) - DayH S1I LastValue (S1,1) // Support 1 R2 PP R1 - S1 R2I LastValue (R2,1) // Resistance 2 S2 PP - R1 S1 S2I LastValue (S2,1) // Support 2 R3 PP R2 - S1 R3I LastValue (R3,1) // Resistance 3 S3 PP - R2 S1 S3I LastValue (S3,1) // Support 3 ppl ParamToggle(Pivot Levels, ShowHide,1) if(ppl1) Plot(PP, PP, colorYellow, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(R1, R1,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(S1, S1,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(R2, R2,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(S2, S2,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(R3, R3,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(S3, S3,colorViolet, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText( Pivot , LastValue(BarIndex())-(numbars/Hts), PPI, colorYellow) PlotText( R1 . LastValue(BarIndex())-(numbars/Hts), R1I, colorViolet) PlotText( S1 . LastValue(BarIndex())-(numbars/Hts), S1I, colorViolet) PlotText( R2 . LastValue(BarIndex())-(numbars/Hts), R2I, colorViolet) PlotText( S2 . LastValue(BarIndex())-(numbars/Hts), S2I, colorViolet) PlotText( R3 . LastValue(BarIndex())-(numbars/Hts), R3I, colorViolet) PlotText( S3 . LastValue(BarIndex())-(numbars/Hts), S3I, colorViolet) // Camerilla Levels // H5DayC1.1rg H5I LastValue (H5,1) H4DayC1.1rg/2 H4I LastValue (H4,1) H3DayC1.1rg/4 H3I LastValue (H3,1) H2DayC1.1rg/6 H2I LastValue (H2,1) H1DayC1.1rg/12 H1I LastValue (H1,1) L1DayC-1.1rg/12 L1I LastValue (L1,1) L2DayC-1.1rg/6 L2I LastValue (L2,1) L3DayC-1.1rg/4 L3I LastValue (L3,1) L4DayC-1.1rg/2 L4I LastValue (L4,1) L5DayC-1.1rg L5I LastValue (L5,1) pcl ParamToggle(Camerilla Levels, ShowHide,0) if(pcl1) Plot(H5,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(H4,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(H3,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(H2,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(H1,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L1,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L2,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L3,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L4,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) Plot(L5,,colorRose, styleDotsstyleNoLinestyleNoRescalestyleNoTitle) PlotText( H5 . LastValue(BarIndex())-(numbars/Hts), H5I 0.05, colorRose) PlotText( H4 . LastValue(BarIndex())-(numbars/Hts), H4I 0.05, colorRose) PlotText( H3 . LastValue(BarIndex())-(numbars/Hts), H3I 0.05, colorRose) PlotText( H2 . LastValue(BarIndex())-(numbars/Hts), H2I 0.05, colorRose) PlotText( H1 . LastValue(BarIndex())-(numbars/Hts), H1I 0.05, colorRose) PlotText( L1 . LastValue(BarIndex())-(numbars/Hts), L1I 0.05, colorRose) PlotText( L2 . LastValue(BarIndex())-(numbars/Hts), L2I 0.05, colorRose) PlotText( L3 . LastValue(BarIndex())-(numbars/Hts), L3I 0.05, colorRose) PlotText( L4 . LastValue(BarIndex())-(numbars/Hts), L4I 0.05, colorRose) PlotText( L5 . LastValue(BarIndex())-(numbars/Hts), L5I 0.05, colorRose) // Current Days Hi Lo // THL ParamToggle(Todays Hi Lo, ShowHide,1) if(THL1) isRth TimeNum() gt 084500 amp TimeNum() lt 085959 isdRth TimeNum() gt 084500 amp TimeNum() lt 160000 aRthL IIf(isRth, L, 1000000) aRthH IIf(isdRth, H, Null) aRthLd IIf(isdRth, L, 1000000) DayH TimeFrameCompress( aRthH, inDaily, compressHigh ) DayH TimeFrameExpand( DayH, inDaily, expandFirst ) DayL TimeFrameCompress( aRthLd, inDaily, compressLow ) DayL TimeFrameExpand( DayL, inDaily, expandFirst ) Bars BarsSince(TimeNum() gt 94500 AND TimeNum() lt 095959)//,BarIndex(),1) // AND DateNum()LastValue(DateNum()) x0 BarCount-LastValue(Bars) x1 BarCount-1 DayHlineLineArray(x0,LastValue(DayH),x1,LastValue (DayH),0) DayLlineLineArray(x0,LastValue(DayL),x1,LastValue (DayL),0) DayHlineI LastValue (DayHline,1) DayLlineI LastValue (DayLline,1) Plot(DayHline, DayH, colorYellow, styleBarstyleNoRescalestyleNoTitle) Plot(DayLline, DayL, colorYellow, styleBarstyleNoRescalestyleNoTitle) PlotText( Day Hi . LastValue(BarIndex())-(numbars/Hts), DayHlineI 0.05, colorYellow) PlotText( Day Lo . LastValue(BarIndex())-(numbars/Hts), DayLlineI 0.05, colorYellow) //Support and resistance levels using RSI. //graham Kavanagh May 2003 //Load into Indicator Builder //Sensitivity of the levels can be changed with the variables //Can test different numbers live with the Param function ctrl-R with open pane RSIperiod 5 // Param(RSI p,3,14,30,1) Percent 5 // Param(ZIG ,8,9,15,1) EMAperiod 5 //Param(EMA p,4,5,10,1) HHVperiod 5 //Param(HHV p,3,5,10,1) NumLine 1 //Param(Num Lines,3,1,20,1) for( i 1 i lt numline i ) ResBase LastValue(Peak(Base, Percent, i)) SupBase LastValue(Trough(Base, Percent, i)) Plot(ValueWhen( ResBaseBase, HHV(H, HHVperiod) ), Resist Level, colorRed, styleDashed) Plot(ValueWhen( supbaseBase, LLV(L, HHVperiod) ), Support Level, colorGreen, styleDashed) Title Name() Date() : Support amp Resistance Levels using RSI: /EncodeColor(colorGreen) Support Levels are Green EncodeColor(colorRed) Resistance Levels are Red: EncodeColor(colorBlack)/ Num lines WriteVal(numline,1) P6Param(Trailing Stop Risk,2.5,2,3.5,0.1) P7Param(Trailing Stop LookBack,14,5,25,1) P8Param(Trailing Stop PrevLow Switch,0,0,1,1) PrevLowIIf(P81, Ref(C,-TroughBars(C,5,1)),Null) Plot(PrevLow,,colorRed) //Position sizing// MyTotalPort Param(MyTotalPort,1000000,10000,10000000,100000) AcceptableRisk Param(AcceptableRisk,0.5,0.1,3,0.1) BarsFromStart BarsSince(Cross(C, Ref(PK,-1))AND Ref(Color,-1)colorRed) InitialStopLoss Ref( H - P6ATR(P7),-BarsFromStart) PositionSizing 0.01AcceptableRiskMyTotalPort/( C - InitialStopLoss ) Plot(IIf( HHV(H - P6ATR(P7),BarsFromStart1) ltC, HHV(H - P6ATR(P7),BarsFromStart1),Null) ,,colorCustom12,1) SetChartOptions(0,chartShowArrowschartShowDates) N(Title StrFormat( - - EncodeColor(colorYellow)Open EncodeColor(colorYellow) g EncodeColor(colorBrightGreen)High EncodeColor(colorBrightGreen) g EncodeColor(colorRed)Low EncodeColor(colorRed) g EncodeColor(colorYellow) Close EncodeColor(colorYellow) g (.1f) Vol WriteVal( V, 1.0 ) , O, H, L, C, SelectedValue( ROC( C, 1 )) )) Odd13//enter Odd numbers only CoefOddround(Odd/2) Even12//enter Even numbers only CoefevenEven/2 Coefeven2Coefeven1 CongestionPercent2.8/Set above/below Moving average for congestion / sideways market/ finalMovavgIIf(Odd gt even, triangularOdd, TriangularEven) ColorcolorBrightGreen//select Moving average line color tickercolorcolorBlack//select price color Plot(finalMovavg,,IIf(C lt finalmovavg, colorRed, Color),styleDotsstyleThick) Code to automatically identify pivots TRIANGLE / // -- what will be our lookback range for the hh and ll farbackParam(How Far back to go,200,12,30,1) nBars Param(Number of bars, 12, 1, 30, 1) // -- Create 0-initialized arrays the size of barcount aHPivs H - H aLPivs L - L // -- More for future use, not necessary for basic plotting aHPivHighs H - H aLPivLows L - L aHPivIdxs H - H aLPivIdxs L - L nHPivs 0 nLPivs 0 lastHPIdx 0 lastLPIdx 0 lastHPH 0 lastLPL 0 curPivBarIdx 0 // -- looking back from the current bar, how many bars // back were the hhv and llv values of the previous // n bars, etc. aHHVBars HHVBars(H, nBars) aLLVBars LLVBars(L, nBars) aHHV HHV(H, nBars) aLLV LLV(L, nBars) // -- Would like to set this up so pivots are calculated back from // last visible bar to make it easy to go back and see the pivots // this code would find. However, the first instance of // Trace output will show a value of 0 aVisBars Status(barvisible) nLastVisBar LastValue(Highest(IIf(aVisBars, BarIndex(), 0))) TRACE(Last visible bar: nLastVisBar) // -- Initialize value of curTrend curBar (BarCount-1) curTrend if (aLLVBarscurBar lt aHHVBarscurBar) curTrend D else curTrend U // -- Loop through bars. Search for // entirely array-based approach // in future version for (i0 iltfarback i) curBar (BarCount - 1) - i // -- Have we identified a pivot If trend is down. if (aLLVBarscurBar lt aHHVBarscurBar) //. and had been up, this is a trend change if (curTrend U) curTrend D // -- Capture pivot information curPivBarIdx curBar - aLLVBarscurBar aLPivscurPivBarIdx 1 aLPivLowsnLPivs LcurPivBarIdx aLPivIdxsnLPivs curPivBarIdx nLPivs // -- or current trend is up else if (curTrend D) curTrend U curPivBarIdx curBar - aHHVBarscurBar aHPivscurPivBarIdx 1 aHPivHighsnHPivs HcurPivBarIdx aHPivIdxsnHPivs curPivBarIdx nHPivs // -- If curTrend is up. else. // -- loop through bars // -- Basic attempt to add a pivot this logic may have missed // -- OK, now I want to look at last two pivots. If the most // recent low pivot is after the last high, I could // still have a high pivot that I didnt catch // -- Start at last bar curBar (BarCount-1) candIdx 0 candPrc 0 lastLPIdx aLPivIdxs0 lastLPL aLPivLows0 lastHPIdx aHPivIdxs0 lastHPH aHPivHighs0 if (lastLPIdx gt lastHPIdx) // -- Bar and price info for candidate pivot candIdx curBar - aHHVBarscurBar candPrc aHHVcurBar if ( lastHPH lt candPrc AND candIdx gt lastLPIdx AND candIdx lt curBar) // -- OK, well add this as a pivot. aHPivscandIdx 1 //. and then rearrange elements in the // pivot information arrays for (j0 jltnHPivs j) aHPivHighsnHPivs-j aHPivHighsnHPivs - (j1) aHPivIdxsnHPivs-j aHPivIdxsnHPivs-(j1) aHPivHighs0 candPrc aHPivIdxs0 candIdx nHPivs else // -- Bar and price info for candidate pivot candIdx curBar - aLLVBarscurBar candPrc aLLVcurBar if ( lastLPL gt candPrc AND candIdx gt lastHPIdx AND candIdx lt curBar) // -- OK, well add this as a pivot. aLPivscandIdx 1 //. and then rearrange elements in the // pivot information arrays for (j0 jltnLPivs j) aLPivLowsnLPivs-j aLPivLowsnLPivs-(j1) aLPivIdxsnLPivs-j aLPivIdxsnLPivs-(j1) aLPivLows0 candPrc aLPivIdxs0 candIdx nLPivs // -- Dump inventory of high pivots for debugging / for (k0 kltnHPivs k) TRACE(High pivot no. k at barindex: aHPivIdxsk , WriteVal(ValueWhen(BarIndex()aHPivIdxsk, DateTime(), 1), formatDateTime) , aHPivHighsk) / // -- OK, lets plot the pivots using arrows PlotShapes(IIf(aHPivs1, shapeSmallDownTriangle, shapeNone), colorCustom12, 0, High, Offset-5) PlotShapes(IIf(aLPivs1, shapeSmallUpTriangle. shapeNone), colorCustom11, 0, Low, Offset-5) Sell aHPivs 1 Buy aLPivs 1 FilterBuy OR Sell SellExRem(Sell, Buy) BuyExRem(Buy, Sell) messageboard ParamToggle(Message Board, ShowHide,0) showsl ParamToggle(Stop Loss Line, ShowHide, 0) no10 resHHV(H, no) supLLV(L, no) avdIIf(CgtRef(res,-1),1,IIf(CltRef(sup,-1),-1,0)) avnValueWhen(avd0,avd,1) s5dIIf(avn1,sup, res) if (showsl 0) // exitlong Cross(s5d, H) PlotShapes(exitlong shapeDownArrow, colorBlack,0,H,-10) exitshort Cross(L, s5d) PlotShapes(exitshort shapeUpArrow, colorBlack,0,L,-15) Buy exitshort Sell exitlong //Short Sell //Cover Buy Buy ExRem(Buy, Sell) Sell ExRem(Sell, Buy) //Short ExRem(Short, Cover) //Cover ExRem(Cover, Short) AlertIf( Buy, , BUY C, 1 ) AlertIf( Sell, , SELL C, 2 ) for(iBarCount-1igt1i--) if(Buyi 1) entry Ci sig BUY sl s5di tar1 entry (entry .0056) tar2 entry (entry .0116) tar3 entry (entry .0216) bars i i 0 if(Selli 1) sig SELL entry Ci sl s5di tar1 entry - (entry .0056) tar2 entry - (entry .0116) tar3 entry - (entry .0216) bars i i 0 Offset 20 Clr IIf(sig BUY, colorLime, colorRed) ssl IIf(bars BarCount-1, s5dBarCount-1, Ref(s5d, -1)) sl sslBarCount-1 Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), , Clr, styleLinestyleDots, Null, Null, Offset) Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), , Clr, styleLinestyleDots, Null, Null, Offset) Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), , Clr, styleLinestyleDots, Null, Null, Offset) Plot(LineArray(bars-Offset, sl, BarCount, sl,1), , colorDarkRed, styleLinestyleLine, Null, Null, Offset) Plot(LineArray(bars-Offset, entry, BarCount, entry,1), , colorGreen, styleLinestyleLine, Null, Null, Offset) for (ibars i ltBarCounti) PlotText(sigentry, BarCount1,entry, Null, colorBlue) PlotText(T1tar1,BarCount3,tar1,Null, Clr)PlotText(T2tar2,BarCount3,tar2,Null, Clr)PlotText (T3tar3,BarCount3,tar3,Null, Clr) printf(Last sig Signal came (BarCount-bars) bars ago) printf(n sig . entry nStop Loss. sl ( WriteVal(IIf(sig SELL, entry-sl, sl-entry), 2.2) ) nTarget1. tar1 nTarget2. tar2 nTarget3. tar3) printf(nCurrent P/L. WriteVal(IIf(sig BUY,(C-entry),(entry-C)),2.2)) if (messageboard 0 ) GfxSelectFont( Tahoma, 13, 100 ) GfxSetBkMode( 1 ) GfxSetTextColor( colorWhite ) if ( sig BUY) GfxSelectSolidBrush( colorBlue ) // this is the box background color else GfxSelectSolidBrush( colorRed ) // this is the box background color pxHeight Status( pxchartheight ) xx Status( pxchartwidth) Left 1100 width 310 x 5 x2 290 GfxSelectPen( colorGreen, 1) // broader color GfxRoundRect( x, y - 163, x2, y. 7, 7 ) GfxTextOut( ( GAIN TRADE ),88,y-165) GfxTextOut( ( ),27,y-160) GfxTextOut( (Last sig Signal came (BarCount-bars-1) Interval()/60 mins ago), 13, y-140) // The text format location GfxTextOut( ( WriteIf(sig BUY, sig, sig ) . entry), 13, y-120) GfxTextOut( (Trailing SL. sl ( WriteVal(IIf(sig SELL, entry-sl, sl-entry), 2.2) )), 13, y-100) GfxTextOut( (TGT:1. tar1), 13, y -80) GfxTextOut( (TGT:2. tar2), 13,y-60) GfxTextOut( (TGT:3. tar3), 13,y-40) GfxTextOut( (Current P/L. WriteVal(IIf(sig BUY,(C-entry),(entry-C)),2.2)), 88, y-22) SECTIONBEGIN(Magnified Market Price) //by Vidyasagar, vkunisetty // FSParam(Font Size,30,30,100,1) GfxSelectFont(Arial, FS, 900, italic False, underline False, True ) GfxSetBkMode( colorWhite ) GfxSetTextColor( ParamColor(Color, colorYellow) ) HorParam(Horizontal Position,800,800,800,800) VerParam(Vertical Position,27,27,27,27) GfxTextOut(C, Hor. Ver ) YCTimeFrameGetPrice(C, inDaily,-1) DDPrec(C-YC,2) xxPrec((DD/YC)100,2) GfxSelectFont(Arial, 12, 700, italic False, underline False, True ) GfxSetBkMode( colorWhite ) GfxSetTextColor(ParamColor(Color, colorYellow) ) GfxTextOut(DD (xx), Hor5, Ver45 ) SECTIONEND() SECTIONBEGIN(trending ribbon) uptrendPDI()gtMDI()AND Signal()ltMACD() downtrendMDI()gtPDI()AND Signal()gtMACD() Plot( 2, / defines the height of the ribbon in percent of pane width /ribbon, IIf( uptrend, colorGreen, IIf( downtrend, colorRed, colorBlack )), / choose color / styleOwnScalestyleAreastyleNoLabel, -0.5, 100 ) SECTIONEND() GraphXSpace5 Nishant Trading System V2.0.afl Author. Nishant Kulkarni (nishantndk ) Visit. www. myinvestmentmanager for investment tips in Indian market. SetChartOptions(0,chartShowArrowschartShowDates) fraction IIf(StrRight(Name(),3) , 3.2, 3.2) tchoiceParam(Title Selection ,2,1,2,1) ZigLevel Param(ZigLevel, 2, 1, 25 ) numbars LastValue(Cum(Status(barvisible))) hts Param (Text Shift, -33.5,-50,50,0.10) dec (Param(Decimals,2,0,7,1)/10)1 bi BarIndex() Lbi LastValue(BarIndex()) sbi SelectedValue(bi) ScanLookBack Param(Scan Lookback, 1, 1, 25 ) function Lastthursday() DaysinmonthIIf(Month()1 OR Month()3 OR Month()5 OR Month()7 OR Month()8 OR Month()10 OR Month()12,31,30) DaysinmonthfebIIf(Year()4 0 AND Year()1000,29,28) DaysinmonthfinalIIf(Month()2,Daysinmonthfeb, Daysinmonth) returnvalueIIf(Daysinmonthfinal-Day()lt7 AND DayOfWeek()4,1,0) return returnvalue SECTIONBEGIN(Price) N(Title StrFormat( - Open g, Hi g, Lo g, Close g (.1f) Vol WriteVal( V, 1.0 ) , O, H, L, C, SelectedValue( ROC( C, 1 )) )) Plot( C, DEFAULTNAME(), colorBlack. styleNoTitle ParamStyle(Style) GetPriceStyle() ) SECTIONEND() P ParamField(Price field,-1) Periods Param(Periods, 15, 2, 100, 1 ) Width Param(Width, 2, 0, 10, 0.05 ) Color ParamColor(Color, colorLightGrey ) Style ParamStyle(Style) styleNoRescale styleNoTitle BBTop BBandTop( P, Periods, Width ) BBBot BBandBot( P, Periods, Width ) BBMid MA(C,20) Plot(BBTop. BBTop PARAMVALUES(), Color, Style ) Plot(BBBot, BBBot PARAMVALUES(), Color, Style ) SECTIONBEGIN(Auto trend line Trendline) percent 0.01 1 / Adjust this percent as necessary, / firstpointL 2 firstpointH 2 for( i 1 i lt BarCount AND y0 gt y1 i ) firstpointL y0LastValue(Trough(L, percent, firstpointL)) x0BarCount - 1 - LastValue(TroughBars(L, percent, firstpointL)) x1BarCount - 1 - LastValue(TroughBars(Ref(L,-1),percent,1)) LineL LineArray( x0, y0, x1, y1, 1 ) Plot( LineL, Support, colorGreen, styleLine styleDots styleNoTitle styleNoRescale) for(i 1 i lt BarCount AND yt0 lt yt1 i ) firstpointH yt0LastValue(Peak(H, percent, firstpointH)) xt0BarCount - 1 - LastValue(PeakBars(H, percent, firstpointH)) xt1BarCount - 1 - LastValue(PeakBars(Ref(H,-1),percent,1)) LineH LineArray( xt0, yt0, xt1, yt1, 1 ) Plot( LineH, Resistance, colorBrown, styleLine styleDots styleNoTitle styleNoRescale) ATBuy Cross(C, LineH) ATShort Cross(LineL, C) PlotShapes(ATBuy shapeUpTriangle. colorBlue,0,L) PlotShapes(ATShort shapeDownTriangle. colorRed,0,H) k Param(K, 1.5, 1, 5, 0.1) Per Param(ATR, 14, 1, 30, 0.50) rfsctor WMA(H-L, Per) revers k rfsctor Plot(NW, , IIf(Trend 1, 27, 4), styleStaircase styleNoRescale) NMBuy NMCover Cross(j, nw) NMSell NMShort Cross(nw, j) baratnwbuy LastValue(ValueWhen((NMBuy ),BarIndex())) baratnwshort LastValue(ValueWhen((NMShort ),BarIndex())) shape NMBuy shapeSmallUpTriangle NMSell shapeSmallDownTriangle PlotShapes( shape, IIf( NMBuy, colorRed, colorBlue ), 0, IIf( NMBuy, L, H)) Plot( 5, Expiry Thursday, IIf( Lastthursday(), colorOrange, colorWhite),styleOwnScalestyleAreastyleNoLabelstyleNoTitle, -0.5, 100 ) Buy NMBuy AND ATBuy Short NMShort AND ATShort baratbuy LastValue(ValueWhen((Buy ),BarIndex())) baratshort LastValue(ValueWhen((Short ),BarIndex())) T1 T2 T3 T4 T5 T6 SL 0 if(baratbuy gt baratshort ) TP Max(NWbaratbuy-1,LineHbaratbuy) HV yt0 LV y0 PlotText(Long Entry WriteVal(BuyPrice, fraction), LastValue(BarIndex())-(numbars/hts), BuyPrice 0.05, colorRed) T1 TP(TP-LV)0.618 T2 TP(TP-LV)1.0 T3 TP(TP-LV)1.382 T4 TP(TP-LV)1.618 T5 TP(TP-LV)2.000 T6 TP(TP-LV)2.620 PlotText(S/L WriteVal(SL, fraction), LastValue(BarIndex())-(numbars/hts), SL 0.05, colorBlue) PlotText(T1 WriteVal(T1,fraction), LastValue(BarIndex())-(numbars/hts), T1 0.05, colorBlue) PlotText(T2 WriteVal(T2,fraction), LastValue(BarIndex())-(numbars/hts), T2 0.05, colorBlue) PlotText(T3 WriteVal(T3,fraction), LastValue(BarIndex())-(numbars/hts), T3 0.05, colorBlue) PlotText(T4 WriteVal(T4,fraction), LastValue(BarIndex())-(numbars/hts), T4 0.05, colorBlue) PlotText(T5 WriteVal(T5,fraction), LastValue(BarIndex())-(numbars/hts), T5 0.05, colorBlue) PlotText(T6 WriteVal(T6,fraction), LastValue(BarIndex())-(numbars/hts), T6 0.05, colorBlue) else if (baratshort gt baratbuy ) TP Min(NWbaratshort-1,LineLbaratshort) HV yt0 LV y0 PlotText(Short Entry WriteVal(ShortPrice, fraction), LastValue(BarIndex())-(numbars/hts), ShortPrice 0.05, colorRed) T1 TP-(HV-TP)0.618 T2 TP-(HV-TP)1.0 T3 TP-(HV-TP)1.382 T4 TP-(HV-TP)1.618 T5 TP-(HV-TP)2.000 T6 TP-(HV-TP)2.620 PlotText(S/L WriteVal(SL, fraction), LastValue(BarIndex())-(numbars/hts), SL 0.05, colorBlue) PlotText(T1 WriteVal(T1,fraction), LastValue(BarIndex())-(numbars/hts), T1 0.05, colorBlue) PlotText(T2 WriteVal(T2,fraction), LastValue(BarIndex())-(numbars/hts), T2 0.05, colorBlue) PlotText(T3 WriteVal(T3,fraction), LastValue(BarIndex())-(numbars/hts), T3 0.05, colorBlue) PlotText(T4 WriteVal(T4,fraction), LastValue(BarIndex())-(numbars/hts), T4 0.05, colorBlue) PlotText(T5 WriteVal(T5,fraction), LastValue(BarIndex())-(numbars/hts), T5 0.05, colorBlue) PlotText(T6 WriteVal(T6,fraction), LastValue(BarIndex())-(numbars/hts), T6 0.05, colorBlue) Buy ( Buy) AND BarIndex() baratbuy AND (BarCount - baratbuy )ltScanLookBack Short ( Short) AND BarIndex() baratshort AND (BarCount - baratshort )ltScanLookBack Filter Buy OR Short Var WriteIf(Buy, LONG, WriteIf(Short, SHORT,)) EntryPrice IIf(Buy, BuyPrice, ShortPrice) AddTextColumn( Var. Long/Short, 1.2. colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn( EntryPrice. Entry Price, 1.2. colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(C, Current Price,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(SL, S/L,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(T1,T1,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(T2,T2,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(T3,T3,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(T4,T4,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(T5,T5,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(T6,T6,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) AddColumn(V, Volume,1.2,colorBlack, IIf( Buy, colorLime, IIf(Short, colorOrange, colorWhite) )) GfxSetOverlayMode(0) GfxSelectFont(Arial, Status(pxheight)/28 ) GfxSetTextAlign( 6 )// center alignment GfxSetTextColor( ColorHSB( 42, 42, 42 ) ) GfxSetBkMode(0) // transparent GfxTextOut( Name(), Status(pxwidth)/2, Status(pxheight)/12 ) GfxSelectFont(Tahoma, Status(pxheight)/30 ) Title EncodeColor(colorBlue)Author: Traderji(www. amibroker) EncodeColor(colorBlack)Title SECTIONEND() SECTIONBEGIN(BackgroundSetting) SetChartBkGradientFill( ParamColor(BgTop, colorCustom14), ParamColor(BgBottom, colorLightGrey),ParamColor(titleblock, colorYellow)) SECTIONEND()

Comments