Wednesday, 11 April 2018

Sistema de negociação médio móvel excel


Melhorando o sistema de cruzamento de média móvel.
Vamos dar uma olhada em um sistema de crossover de média móvel simples e ver se podemos melhorá-lo. Especificamente, podemos melhorar o desempenho do sistema de média móvel ao reduzir o número de serrações durante esses mercados de faixa de alcance temidos? Whipsaws ocorrem quando um mercado passa de um modo de tendência para um modo de consolidação. Durante este modo de consolidação, o sistema fica muito curto, criando uma sequência de negociações perdidas. Negociações longas repentinamente revertem atingindo sua parada. Da mesma forma para comércios curtos. Estes "sinais falsos" # 8217; pode destruir sua curva de capital. Neste artigo, vou apresentar dois métodos simples para melhorar o sistema de crossover de média móvel simples. Essas idéias podem ser facilmente implementadas em seus sistemas de negociação e podem fornecer um ótimo ponto de partida para um sistema de acompanhamento de tendência.
Sistema de linha de base.
Nosso sistema de linha de base consistirá de duas médias móveis simples (SMA) executadas em um gráfico diário dos futuros do Euro. Eu estou escolhendo o euro porque demonstrou características de tendência sólidas ao contrário dos mercados de índice de ações que tendem a ser reversão de média. Se você se lembrar, os sinais serão gerados quando uma média móvel mais rápida (trigger SMA ou trigger line) cruzar uma média móvel mais lenta (SMA lenta ou slow line).
Período SMA 50 lento.
Trigger SMA 3 período.
Ir Longo quando o gatilho cruzar acima do Slow SMA.
Vá em Curto quando o gatilho cruzar em Slow SMA.
Datas testadas: maio de 2001 & # 8211; 30 de setembro de 2013.
Comissões e amp; Slippage: $ 30 deduzido por negociação.
Número de contratos: 1.
Para aqueles que usam o TradeStation, o sistema de linha de base foi criado com a inserção de duas estratégias no gráfico fornecidas pela TradeStation. Abaixo estão as duas estratégias. O primeiro controla as regras de entrada longa (LE) e o segundo controla as regras de entrada curta (SE). Você pode ver os campos de entrada contendo os três e os cinquenta para os dois períodos diferentes para as nossas médias móveis. Compre usando essas estratégias fornecidas que você pode criar uma estratégia de crossover de média móvel em segundos sem nenhuma habilidade de codificação.
Curva de Equidade do Sistema de Linha de Base.
Essas duas regras simples produzem um sistema de negociação que é realmente lucrativo no longo prazo. Este é um testimate para as características de tendência do mercado de futuros do Euro. No entanto, há períodos de grandes perdas e longos períodos em que não são criados novos máximos de patrimônio. Não é provável que alguém realmente troque isso com dinheiro real. A imagem abaixo mostra um período recente a partir de 2011, quando o euro entrou em uma fase de consolidação durante os meses de verão de junho a agosto. Durante esse período, nosso Sistema de Linha de Base produziu uma seqüência de oito negociações perdedoras consecutivas.
Whipsaw Verão 2011.
Melhoria # 1: Entrada atrasada.
Com esse método de entrada, atrasaremos nossa entrada no mercado depois que a linha de disparo cruzar a lenta SMA. Então, quando a linha de disparo cruza a lenta SMA, não abrimos nossa posição imediatamente. Atrasamos por vários bares. Vamos dizer que esperamos por 15 barras após a ocorrência da cruz. No décimo bar após o sinal, vemos se o preço ainda está acima do SMA lento (para uma entrada longa) e entramos em aberto no dia 11. Se o preço estiver abaixo do nosso SMA lento, não abrimos uma nova posição. Ao fazer isso, eliminamos algumas barganhas às custas de entrar na negociação mais tarde do que a cruz original da SMA. A idéia por trás desse método é se um novo mercado em alta está prestes a começar, o preço não deve cair abaixo do SMA lento. Em suma, é outra maneira de medir a quantidade de condenação para a próxima fase do mercado. No entanto, vamos manter a saída igual. Quando ocorre uma cruz de EMA, sempre fechamos nossa posição aberta. Nós só aplicamos o atraso ao abrir uma nova posição.
A curva de capital com a nossa entrada atrasada, na verdade, move toda a curva de capital acima da linha zero. Menos negócios são feitos e reduzimos o lucro líquido total. A curva de capital também parece um pouco menos irregular, implicando uma subida ligeiramente mais suave. Abaixo está uma imagem mostrando o período de verão whipsaw em 2011. Você vai notar que reduzimos o número de whipsaws de oito para zero.
Whipsaw Verão 2011.
Melhoria # 2: bandas de negociação.
Ao contrário do crossover de média móvel padrão, em que a linha de disparo deve simplesmente cruzar o SMA lento, nossa linha de disparo deve agora demonstrar convicção cruzando além do SMA lento. Por exemplo, imagine outra banda acima do SMA lento que seja 1 ATR acima do SMA lento. Para abrir uma nova posição longa, precisamos que a linha de disparo penetre na banda ATR acima da linha lenta. Agora imagine outra banda que é um ATR abaixo do SMA. Essa banda representa nosso gatilho curto quando abrimos uma posição curta. Esperamos eliminar algumas falhas, atrasando nossa entrada e forçando o mercado a nos mostrar alguma força.
Alguns de vocês já devem ter percebido que o que temos é um canal Keltner. Um canal Keltner não é nada mais que uma média móvel (SMA lento) com um número X de ATRs de banda superior acima e abaixo do SMA lento. As bandas superior e inferior atuam como o gatilho para inserir uma posição longa ou uma posição curta. As bandas se adaptam à volatilidade em expansão, exigindo mais convicção de preços para iniciar uma nova posição. Da mesma forma, essas bandas se contraem durante tempos de menor volatilidade. Assim, as regras de entrada e saída são mais dinâmicas para um mercado em mudança do que um simples crossover de média móvel.
O gráfico de patrimônio não parece muito diferente do nosso sistema de linha de base. Toda a curva de capital gasta menos tempo perto da linha zero e há menos negociações. Abaixo está o mesmo período de tempo mostrando que o Sistema de Banda reduziu o número de sinais falsos de oito para dois. Esta é uma grande melhoria em relação ao sistema de linha de base.
Cada um dos dois métodos melhorou os resultados do sistema de linha de base original. Olhando para a tabela abaixo, podemos ver estatísticas de desempenho, como fator de lucro, porcentagem de ganhadores e lucro líquido médio de comércio, todos aumentados. O Keltner produziu as melhores estatísticas globais. Nós certamente não temos um sistema de negociação que seja negociável com dinheiro real, mas cumprimos nossa missão. Reduzimos o número de whipsaws com o nosso Sistema de Entrada com Atraso e Sistema de Entrada de Banda. Você pode ver isso observando o número de negociações realizadas por cada sistema e a porcentagem de negociações vencedoras.
Mais ideias
Você pode fazer essa pesquisa em todos os tipos de direções. Aqui mais duas ideias.
Delay With Time Decay & # 8211; Os mercados mudam entre tendências e não tendências, como todos sabemos. Muitas vezes, você notará uma sequência de sons rápidos em um sistema de crossover médio móvel logo após o fechamento de uma grande negociação vencedora. O mercado aparentemente está agora se transformando em um mercado limitado e provavelmente fará isso por algum tempo. No entanto, à medida que os dias ou semanas se desgastam, a probabilidade de uma fuga provavelmente aumenta. Assim, talvez possamos reduzir o tempo de atraso com o passar do tempo. Após o encerramento de uma negociação bem-sucedida, começamos a procurar a próxima cruz com nosso atraso de barra X padrão. O mercado permanece ligado ao limite e produz vários sinais falsos ao longo das semanas, mas o nosso sistema não recebe novos sinais. Durante estes sinais falsos, o contador de atrasos é reiniciado, mas nem sempre o redefini-lo para X. Todos os dias ou todas as semanas, reduzimos o atraso do dia X em um. Fazemos isso porque acreditamos que, com o passar do tempo, uma fuga se torna mais provável. No entanto, nunca reduzimos o X para chegar a zero ou menos. Na verdade, podemos nunca querer ir muito abaixo de 5 ou mais.
Filtro de tendência & # 8211; Em um artigo anterior, usei o rsRank ou um SMA de 200 períodos como indicador de tendência para ajudar a determinar o quadro geral do euro. Em outras palavras, estamos em um mercado de alta ou baixa? Talvez apenas fazer negócios longos durante um mercado altista ou fazer negócios curtos durante um mercado de baixa possa melhorar os resultados. Este seria um teste interessante e simples de realizar. Eu adoraria ouvir seus resultados.
Não deixe de comentar abaixo. Eu adoraria ouvir alguma ideia ou resultado dos seus próprios testes!
Tanto a linha de base quanto os sistemas de canal Keltner são diretos para serem criados, portanto, não estão incluídos aqui. No entanto, o sistema baseado em entrada atrasada é um pouco mais complicado de codificar para que o sistema esteja disponível aqui para download.
MA Crossover Com Atraso TradeStation (ELD)
Sobre o autor Jeff Swanson.
Jeff é o fundador do System Trader Success - um site e uma missão para capacitar o profissional de varejo com o conhecimento e as ferramentas adequadas para se tornar um operador lucrativo no mundo da negociação quantitativa / automatizada.
Posts Relacionados.
Guia para iniciantes de negociação quantitativa.
Estudo de caso: Uma técnica simples do Market Internals pode melhorar os resultados da estratégia de negociação?
Você está perdendo quando deveria estar ganhando? Aqui está algo que você pode estar perdendo.
Você já olhou para a Média Móvel Exponencial Dupla (DEMA)? Em milhares de testes, tentando todas as idéias baseadas em MA que eu poderia pensar, o DEMA era de longe o MA mais confiável para crossovers que eu vi.
Eu pessoalmente não olhei muito para o DEMA. Eu vou ter que dar uma chance. Obrigado por compartilhar sua idéia.
Assim que eu me ponho um pouco melhor em navegar pela TradeStation e pela Easy Language, estou ansioso para testar ideias como essa! Estou curioso para ver como a combinação de alguns deles afetaria os resultados.
Ótimo Andy! Esta é a melhor maneira de aprender & # 8211; sujar as mãos construindo, testando e modificando o código. Aqui estão alguns links que você pode achar úteis.
Você pode encontrar alguns tutoriais gratuitos aqui:
TradeStation como alguns bons exemplos, mas são mais complicados:
Fóruns de discussão do EasyLanguage:
Guia de Programação EasyLanguage:
Ei, boa dica sobre o atraso, eu tenho experimentado usando escala de vela e médias móveis, estou tendo problemas para programá-los em probuilder, você tem alguma idéia?
Não necessariamente o primeiro lugar para mergulhar o dedo do pé na água, mas o código educacional e útil também. A última vez que ouvi um tutorial oficial da Tradestation sobre matrizes, o tutor não pôde pensar por que você gostaria de usar um. Bill Brower pode. Coisas realmente boas.
Aproveite o effot colocado e respeitado leituras como fornecidas pelo seu site. Uma pergunta rápida: você poderia explicar por que sua codificação nunca incorpora uma função setdollartailing? A razão é a mais óbvia, mas eu gostaria de aqui de você.
Obrigado novamente e mantenha o grande trabalho.
O pequeno trabalho que fiz com o setdollartriling não funcionou muito bem. Com base nos meus testes, muitas vezes prejudicou o sistema mais do que ajudou. Não estou dizendo que não há usos válidos para setdollartrailing, mas não encontrei muitas ocasiões. Muitas vezes descobri que sair com base no tempo ou em um evento, como preço cruzando um limite, é muito melhor como uma saída. Isso também inclui não mover meu disco rígido.
Desculpe pela distração, ou seja, erro de ortografia & # 8211; A função de autocorreção tem sua própria mente.
Você está certo em seu método de melhorar as estratégias de médias móveis, já que os MAs estão atrasados ​​e criando muitas barulhos. O que eu prefiro fazer é usar 2 EMAs em vez de 2 SMAs. E quando o mais rápido cruza o mais lento no gráfico diário eu começo a negociar com base no gráfico H4 (4 horas) apenas na direção da tendência (diária) até que o EMA mais rápido vira no gráfico diário (quero dizer, quando não aponta mais na mesma direção com o mais lento, mas parece estar invertendo, não há necessidade de esperar até que ele cruza o mais lento no dia anterior).
Eu devo completar isso muitas vezes, mesmo que o EMA mais rápido vire como se estivesse invertendo para cruzar o mais lento, ele pode voltar em breve, fazendo com que a tendência no dia-a-dia continue. Nesse caso, continuo negociando em gráficos H4 na direção da mesma tendência (diária) renovada.
Posts populares.
Atualização de RSI de 2 períodos do Connors para 2013.
Este indicador simples faz dinheiro de novo e de novo.
O portfólio Ivy.
Melhorando a estratégia do intervalo simples, parte 1.
Copyright © 2011-2018 pela Capital Evolution LLC. - projetado por prosperar temas | Alimentado por WordPress.
Por favor faça login novamente. A página de login será aberta em uma nova janela. Após o login, você pode fechá-lo e retornar a esta página.

Médias Móveis - Simples e Exponencial.
Índice.
Médias Móveis - Simples e Exponencial.
Introdução.
As médias móveis suavizam os dados de preço para formar um indicador de tendência seguinte. Eles não prevêem a direção do preço, mas definem a direção atual com um atraso. As médias móveis são atrasadas porque são baseadas em preços passados. Apesar desse atraso, as médias móveis ajudam a suavizar a ação do preço e filtram o ruído. Eles também formam os blocos de construção de muitos outros indicadores técnicos e sobreposições, como o Bollinger Bands, o MACD e o McClellan Oscillator. Os dois tipos mais populares de médias móveis são a média móvel simples (SMA) e a média móvel exponencial (EMA). Essas médias móveis podem ser usadas para identificar a direção da tendência ou definir níveis potenciais de suporte e resistência.
Aqui está um gráfico com um SMA e um EMA:
Clique no gráfico para uma versão ao vivo.
Cálculo da média móvel simples.
Uma média móvel simples é formada pelo cálculo do preço médio de um título em um número específico de períodos. A maioria das médias móveis é baseada nos preços de fechamento. Uma média móvel simples de 5 dias é a soma de cinco dias dos preços de fechamento dividido por cinco. Como o próprio nome indica, uma média móvel é uma média que se move. Os dados antigos são descartados quando novos dados são disponibilizados. Isso faz com que a média se mova ao longo da escala de tempo. Abaixo está um exemplo de uma média móvel de 5 dias evoluindo ao longo de três dias.
O primeiro dia da média móvel simplesmente cobre os últimos cinco dias. O segundo dia da média móvel cai o primeiro ponto de dados (11) e adiciona o novo ponto de dados (16). O terceiro dia da média móvel continua soltando o primeiro ponto de dados (12) e adicionando o novo ponto de dados (17). No exemplo acima, os preços aumentam gradualmente de 11 para 17 em um total de sete dias. Observe que a média móvel também aumenta de 13 para 15 em um período de cálculo de três dias. Além disso, observe que cada valor médio móvel está logo abaixo do último preço. Por exemplo, a média móvel para o dia um é igual a 13 e o último preço é 15. Os preços dos quatro dias anteriores foram menores e isso faz com que a média móvel caia.
Cálculo da média móvel exponencial.
As médias móveis exponenciais (EMAs) reduzem a defasagem aplicando mais peso aos preços recentes. A ponderação aplicada ao preço mais recente depende do número de períodos na média móvel. Os EMAs diferem das médias móveis simples em que o cálculo do EMA de um determinado dia depende dos cálculos do EMA para todos os dias anteriores a esse dia. Você precisa de mais de 10 dias de dados para calcular um EMA de 10 dias razoavelmente preciso.
Existem três etapas para calcular uma média móvel exponencial (EMA). Primeiro, calcule a média móvel simples para o valor inicial de EMA. Uma média móvel exponencial (EMA) tem que começar em algum lugar, então uma média móvel simples é usada como o EMA do período anterior no primeiro cálculo. Em segundo lugar, calcule o multiplicador de ponderação. Terceiro, calcule a média móvel exponencial de cada dia entre o valor inicial de EMA e hoje, usando o preço, o multiplicador e o valor de EMA do período anterior. A fórmula abaixo é para um EMA de 10 dias.
O multiplicador de ponderação.
Uma média móvel exponencial de 10 períodos aplica uma ponderação de 18,18% ao preço mais recente. Um EMA de 10 períodos também pode ser chamado de 18,18% de EMA. Um EMA de 20 períodos aplica uma ponderação de 9,52% ao preço mais recente (2 / (20 + 1) = 0,0952). Observe que a ponderação para o período de tempo mais curto é maior que a ponderação para o período de tempo mais longo. Na verdade, a ponderação cai pela metade toda vez que o período de média móvel duplica.
Se você quiser usar uma porcentagem específica para um EMA, poderá usar essa fórmula para convertê-lo em períodos e inserir esse valor como o parâmetro do EMA:
Precisão EMA.
Abaixo está um exemplo de planilha de uma média móvel simples de 10 dias e uma média móvel exponencial de 10 dias para a Intel. O cálculo do SMA é simples e requer pouca explicação: o SMA de 10 dias simplesmente se move à medida que novos preços se tornam disponíveis e os preços antigos caem. A média móvel exponencial na planilha começa com o valor SMA (22,22) para seu primeiro valor EMA. Após o primeiro cálculo, a fórmula normal do EMA é usada.
A fórmula para um EMA incorpora o valor EMA do período anterior, que, por sua vez, incorpora o valor do valor EMA antes, e assim por diante. Cada valor de EMA anterior representa uma pequena parte do valor atual. Portanto, o valor atual do EMA mudará dependendo de quantos dados do passado você usa no cálculo do EMA. Idealmente, para uma EMA 100% precisa, você deve usar todos os pontos de dados que a ação já teve no cálculo da EMA, iniciando seus cálculos desde o primeiro dia em que a ação existiu. Isso nem sempre é prático, mas quanto mais pontos de dados você usar, mais preciso será o seu EMA. O objetivo é maximizar a precisão, minimizando o tempo de cálculo.
O exemplo de planilha abaixo retorna 30 períodos. Com apenas 30 pontos de dados incorporados nos cálculos da EMA, os valores de 10 dias da EMA na planilha não são muito precisos. Em nossos gráficos, calculamos pelo menos 250 períodos (normalmente muito mais), resultando em valores de EMA precisos dentro de uma fração de centavo.
O fator de atraso
Quanto maior a média móvel, mais o atraso. Uma média móvel exponencial de 10 dias irá abraçar os preços bem de perto e mudar logo após a alta dos preços. Médias móveis curtas são como lanchas - ágeis e rápidas de mudar. Em contraste, uma média móvel de 100 dias contém muitos dados antigos que diminuem a velocidade. Médias móveis mais longas são como petroleiros oceânicos - letárgico e lento para mudar. É preciso um movimento de preço maior e mais longo para uma média móvel de 100 dias para mudar de rumo.
Clique no gráfico para uma versão ao vivo.
O gráfico acima mostra o S & P 500 ETF com uma MME de 10 dias acompanhando os preços e uma moagem de 100 dias da SMA mais alta. Mesmo com o declínio de janeiro a fevereiro, a SMA de 100 dias realizou o curso e não recusou. O SMA de 50 dias se encaixa em algum lugar entre as médias móveis de 10 e 100 dias quando se trata do fator de atraso.
Médias Móveis Simples vs Exponenciais.
Embora existam diferenças claras entre médias móveis simples e médias móveis exponenciais, uma não é necessariamente melhor que a outra. As médias móveis exponenciais têm menos defasagem e, portanto, são mais sensíveis aos preços recentes - e às mudanças recentes nos preços. As médias móveis exponenciais girarão antes de médias móveis simples. Médias móveis simples, por outro lado, representam uma média real de preços para todo o período de tempo. Como tal, médias móveis simples podem ser mais adequadas para identificar níveis de suporte ou resistência.
A preferência média móvel depende de objetivos, estilo analítico e horizonte de tempo. Os cartógrafos devem experimentar os dois tipos de médias móveis, bem como prazos diferentes para encontrar o melhor ajuste. O gráfico abaixo mostra a IBM com o SMA de 50 dias em vermelho e o EMA de 50 dias em verde. Ambos atingiram o pico no final de janeiro, mas o declínio na EMA foi mais acentuado do que o declínio na SMA. A EMA apareceu em meados de fevereiro, mas a SMA continuou em baixa até o final de março. Observe que o SMA apareceu mais de um mês após o EMA.
Comprimentos e Prazos.
A duração da média móvel depende dos objetivos analíticos. Médias móveis curtas (5 a 20 períodos) são mais adequadas para tendências e negociações de curto prazo. Os cartistas interessados ​​em tendências de médio prazo optariam por médias móveis mais longas, que poderiam se estender por 20 a 60 períodos. Os investidores de longo prazo preferirão médias móveis com 100 ou mais períodos.
Alguns comprimentos médios móveis são mais populares que outros. A média móvel de 200 dias é talvez a mais popular. Por causa de seu comprimento, esta é claramente uma média móvel de longo prazo. Em seguida, a média móvel de 50 dias é bastante popular para a tendência de médio prazo. Muitos grafistas usam as médias móveis de 50 e 200 dias juntas. Curto prazo, uma média móvel de 10 dias era bastante popular no passado porque era fácil calcular. Um simplesmente adicionou os números e moveu o ponto decimal.
Identificação de tendência.
Os mesmos sinais podem ser gerados usando médias móveis simples ou exponenciais. Como observado acima, a preferência depende de cada indivíduo. Estes exemplos abaixo usarão médias móveis simples e exponenciais. O termo "média móvel" aplica-se a médias móveis simples e exponenciais.
A direção da média móvel transmite informações importantes sobre os preços. Uma média móvel crescente mostra que os preços geralmente estão aumentando. Uma queda na média móvel indica que os preços, em média, estão caindo. Uma média móvel crescente de longo prazo reflete uma tendência de alta de longo prazo. A queda da média móvel de longo prazo reflete uma tendência de baixa de longo prazo.
O gráfico acima mostra 3M (MMM) com uma média móvel exponencial de 150 dias. Este exemplo mostra o quão bem as médias móveis funcionam quando a tendência é forte. A MME de 150 dias foi desativada em novembro de 2007 e novamente em janeiro de 2008. Observe que foi necessário um declínio de 15% para reverter a direção dessa média móvel. Esses indicadores de atraso identificam inversões de tendência à medida que ocorrem (na melhor das hipóteses) ou depois de ocorrerem (na pior das hipóteses). MMM continuou em baixa em março de 2009 e, em seguida, subiu 40-50%. Observe que a MME de 150 dias só apareceu após esse aumento. Uma vez feito, no entanto, a MMM continuou em alta nos próximos 12 meses. As médias móveis funcionam de forma brilhante em tendências fortes.
Cruzamentos duplos.
Duas médias móveis podem ser usadas juntas para gerar sinais de cruzamento. Em Análise Técnica dos Mercados Financeiros, John Murphy chama isso de “método crossover duplo”. Os cruzamentos duplos envolvem uma média móvel relativamente curta e uma média móvel relativamente longa. Como em todas as médias móveis, o comprimento geral da média móvel define o período de tempo do sistema. Um sistema usando um EMA de 5 dias e EMA de 35 dias seria considerado de curto prazo. Um sistema usando uma SMA de 50 dias e uma SMA de 200 dias seria considerado de médio prazo, talvez até mesmo de longo prazo.
Um cruzamento de alta ocorre quando a média móvel mais curta cruza acima da média móvel mais longa. Isso também é conhecido como uma cruz de ouro. Um cruzamento de baixa ocorre quando a média móvel mais curta cruza abaixo da média móvel mais longa. Isso é conhecido como uma cruz morta.
Os cruzamentos médios móveis produzem sinais relativamente tardios. Afinal, o sistema emprega dois indicadores de atraso. Quanto mais longos os períodos médios móveis, maior o atraso nos sinais. Esses sinais funcionam muito bem quando uma boa tendência toma conta. No entanto, um sistema de crossover de média móvel produzirá muitas falhas na ausência de uma forte tendência.
Há também um método de crossover triplo que envolve três médias móveis. Novamente, um sinal é gerado quando a menor média móvel cruza as duas médias móveis mais longas. Um sistema de crossover triplo simples pode envolver médias móveis de 5 dias, 10 dias e 20 dias.
O gráfico acima mostra o Home Depot (HD) com EMA de 10 dias (linha pontilhada verde) e EMA de 50 dias (linha vermelha). A linha preta é o fechamento diário. Usando um cruzamento de média móvel teria resultado em três whipsaws antes de pegar um bom comércio. A MME de 10 dias quebrou abaixo da EMA de 50 dias no final de outubro (1), mas isso não durou muito enquanto os 10 dias voltavam em meados de novembro (2). Esta cruz durou mais tempo, mas o próximo cruzamento de baixa em janeiro (3) ocorreu perto dos níveis de preços do final de novembro, resultando em outro whipsaw. Esta linha de baixa não durou muito, pois a MME de 10 dias recuou acima dos 50 dias, alguns dias depois (4). Depois de três sinais ruins, o quarto sinal antecipou um forte movimento, com as ações avançando acima de 20%.
Existem dois tópicos aqui. Primeiro, crossovers são propensos a whipsaw. Um filtro de preço ou tempo pode ser aplicado para ajudar a evitar o excesso de impressões. Os comerciantes podem exigir que o crossover dure 3 dias antes de agir ou exigir que a MME de 10 dias se mova acima / abaixo da MME de 50 dias em um determinado valor antes de agir. Em segundo lugar, o MACD pode ser usado para identificar e quantificar esses cruzamentos. MACD (10,50,1) mostrará uma linha representando a diferença entre as duas médias móveis exponenciais. O MACD torna-se positivo durante uma cruz dourada e negativo durante uma cruz morta. O Oscilador de Preço de Porcentagem (PPO) pode ser usado da mesma maneira para mostrar as diferenças percentuais. Observe que o MACD e o PPO são baseados em médias móveis exponenciais e não corresponderão a médias móveis simples.
Este gráfico mostra o Oracle (ORCL) com o EMA de 50 dias, o EMA de 200 dias e o MACD (50,200,1). Houve quatro crossovers médios móveis ao longo de um período de 2 anos e meio. Os três primeiros resultaram em whipsaws ou maus negócios. Uma tendência sustentada começou com o quarto crossover quando o ORCL avançou para meados dos anos 20. Mais uma vez, os cruzamentos médios móveis funcionam muito bem quando a tendência é forte, mas produzem perdas na ausência de uma tendência.
Preços cruzados.
As médias móveis também podem ser usadas para gerar sinais com simples cruzamento de preços. Um sinal de alta é gerado quando os preços se movem acima da média móvel. Um sinal de baixa é gerado quando os preços se movem abaixo da média móvel. Crossovers de preços podem ser combinados para negociar dentro da tendência maior. A média móvel mais longa define o tom para a tendência maior e a média móvel mais curta é usada para gerar os sinais. Uma pessoa procuraria cruzamentos de preços de alta apenas quando os preços já estivessem acima da média móvel mais longa. Isso estaria negociando em harmonia com a tendência maior. Por exemplo, se o preço estiver acima da média móvel de 200 dias, os gráficos só se concentrarão em sinais quando o preço se movimentar acima da média móvel de 50 dias. Obviamente, um movimento abaixo da média móvel de 50 dias precederia tal sinal, mas tais linhas de baixa seriam ignoradas, porque a tendência maior é de alta. Uma linha de baixa simplesmente sugeriria um recuo dentro de uma tendência de alta maior. Um cross back acima da média móvel de 50 dias sinalizaria uma melhora nos preços e a continuação da maior tendência de alta.
O gráfico a seguir mostra a Emerson Electric (EMR) com a EMA de 50 dias e a EMA de 200 dias. As ações subiram acima e ficaram acima da média móvel de 200 dias em agosto. Houve quedas abaixo da MME de 50 dias no início de novembro e novamente no início de fevereiro. Os preços rapidamente recuaram acima da MME de 50 dias para fornecer sinais de alta (setas verdes) em harmonia com a tendência de alta maior. O MACD (1,50,1) é mostrado na janela do indicador para confirmar cruzamentos de preço acima ou abaixo da MME de 50 dias. O EMA de 1 dia é igual ao preço de fechamento. O MACD (1,50,1) é positivo quando o fechamento está acima da MME de 50 dias e negativo quando o fechamento está abaixo da MME de 50 dias.
Suporte e Resistência.
As médias móveis também podem atuar como suporte em uma tendência de alta e resistência em uma tendência de baixa. Uma tendência de alta de curto prazo pode encontrar suporte próximo à média móvel simples de 20 dias, que também é usada em Bollinger Bands. Uma tendência de alta de longo prazo pode encontrar suporte perto da média móvel simples de 200 dias, que é a média móvel de longo prazo mais popular. De fato, a média móvel de 200 dias pode oferecer suporte ou resistência simplesmente porque é amplamente usada. É quase como uma profecia auto-realizável.
O gráfico acima mostra o NY Composite com a média móvel simples de 200 dias de meados de 2004 até o final de 2008. O suporte de 200 dias forneceu várias vezes durante o avanço. Uma vez que a tendência se inverteu com uma quebra de suporte de topo duplo, a média móvel de 200 dias atuou como resistência por volta de 9500.
Não espere níveis exatos de suporte e resistência de médias móveis, especialmente médias móveis mais longas. Os mercados são movidos pela emoção, o que os torna propensos a overshoots. Em vez de níveis exatos, as médias móveis podem ser usadas para identificar zonas de suporte ou resistência.
Conclusões
As vantagens do uso de médias móveis precisam ser ponderadas em relação às desvantagens. Médias móveis são os seguintes indicadores de tendência, ou atrasos, que sempre estarão um passo atrás. Isso não é necessariamente uma coisa ruim. Afinal, a tendência é sua amiga e é melhor negociar na direção da tendência. Médias móveis garantem que um trader esteja alinhado com a tendência atual. Mesmo que a tendência seja sua amiga, as seguradoras gastam muito tempo nas faixas de negociação, o que torna as médias móveis ineficazes. Uma vez em uma tendência, as médias móveis vão mantê-lo, mas também dar sinais atrasados. Não espere vender no topo e compre na parte inferior usando médias móveis. Como a maioria das ferramentas de análise técnica, as médias móveis não devem ser usadas sozinhas, mas em conjunto com outras ferramentas complementares. Os cartistas podem usar as médias móveis para definir a tendência geral e, em seguida, usar o RSI para definir os níveis de sobrecompra ou sobrevenda.
Usando com o SharpCharts.
As médias móveis estão disponíveis no SharpCharts como uma sobreposição de preços. Usando o menu suspenso Sobreposições, os usuários podem escolher uma média móvel simples ou uma média móvel exponencial. O primeiro parâmetro é usado para definir o número de períodos de tempo.
Um parâmetro opcional pode ser adicionado para especificar qual campo de preço deve ser usado nos cálculos - "O" para o Aberto, "H" para o Alto, "L" para o Baixo e "C" para o Fechamento. Uma vírgula é usada para separar parâmetros.
Outro parâmetro opcional pode ser adicionado para mudar as médias móveis para a esquerda (passado) ou para a direita (futuro). Um número negativo (-10) mudaria a média móvel para os 10 períodos esquerdos. Um número positivo (10) mudaria a média móvel para os 10 períodos corretos.
Múltiplas médias móveis podem ser sobrepostas ao gráfico de preço simplesmente adicionando outra linha de sobreposição ao ambiente de trabalho. Os membros do StockCharts podem alterar as cores e o estilo para diferenciar entre múltiplas médias móveis. Depois de selecionar um indicador, abra “Opções avançadas” clicando no pequeno triângulo verde.
"Opções avançadas" também pode ser usado para adicionar uma sobreposição de média móvel a outros indicadores técnicos, como RSI, CCI e Volume.
Clique aqui para um gráfico ao vivo com várias médias móveis diferentes.
Varreduras sugeridas.
Cruz média móvel de alta.
Essa verificação procura por ações com uma média móvel simples de 150 dias e uma linha de alta da EMA de 5 dias e EMA de 35 dias. A média móvel de 150 dias está aumentando desde que esteja negociando acima de seu nível há cinco dias. Uma linha de alta ocorre quando a MME de 5 dias se move acima da MME de 35 dias em volume acima da média.
Média de movimento médio de baixa.
Esta análise procura ações com uma média móvel simples de 150 dias em queda e uma linha de baixa da MME de 5 dias e EMA de 35 dias. A média móvel de 150 dias está caindo desde que esteja sendo negociada abaixo de seu nível há cinco dias. Uma linha de baixa ocorre quando a MME de 5 dias se move abaixo da MME de 35 dias em volume acima da média.
Para obter mais detalhes sobre a sintaxe a ser usada nas varreduras da Média móvel, consulte nossa Referência do indicador de varredura no Centro de suporte.
Um estudo mais aprofundado.
O livro de John Murphy tem um capítulo dedicado às médias móveis e seus vários usos. Murphy cobre os prós e contras das médias móveis. Além disso, Murphy mostra como as médias móveis funcionam com Bollinger Bands e sistemas de negociação baseados em canais.
Recursos adicionais.
Stocks & amp; Artigos de Revistas de Commodities.
Maio de 1993 - Stocks & amp; Commodities V. 11: 6 (257-260)

Como calcular as médias móveis no Excel.
Análise de dados do Excel para leigos, 2ª edição.
O comando Análise de dados fornece uma ferramenta para calcular médias móveis e exponencialmente suavizadas no Excel. Suponha, por exemplo, que você tenha coletado informações diárias de temperatura. Você quer calcular a média móvel de três dias & # 8212; a média dos últimos três dias & # 8212; como parte de algumas previsões meteorológicas simples. Para calcular médias móveis para esse conjunto de dados, siga as etapas a seguir.
Para calcular uma média móvel, clique primeiro no botão de comando Data Analysis (Análise de dados) da guia Data.
Quando o Excel exibir a caixa de diálogo Análise de dados, selecione o item Média móvel na lista e clique em OK.
Excel exibe a caixa de diálogo Média móvel.
Identifique os dados que você deseja usar para calcular a média móvel.
Clique na caixa de texto Intervalo de entrada da caixa de diálogo Média móvel. Em seguida, identifique o intervalo de entrada, digitando um endereço de intervalo da planilha ou usando o mouse para selecionar o intervalo da planilha.
Sua referência de intervalo deve usar endereços de célula absolutos. Um endereço de célula absoluto precede a letra da coluna e o número da linha com sinais $, como em $ A $ 1: $ A $ 10.
Se a primeira célula do seu intervalo de entrada incluir um rótulo de texto para identificar ou descrever seus dados, marque a caixa de seleção Etiquetas na primeira linha.
Na caixa de texto Intervalo, informe ao Excel quantos valores incluir no cálculo da média móvel.
Você pode calcular uma média móvel usando qualquer número de valores. Por padrão, o Excel usa os três valores mais recentes para calcular a média móvel. Para especificar que algum outro número de valores seja usado para calcular a média móvel, insira esse valor na caixa de texto Intervalo.
Diga ao Excel onde colocar os dados da média móvel.
Use a caixa de texto Intervalo de Saída para identificar o intervalo da planilha no qual você deseja colocar os dados da média móvel. No exemplo da planilha, os dados da média móvel foram colocados no intervalo da planilha B2: B10.
(Opcional) Especifique se você deseja um gráfico.
Se você quiser um gráfico que plote as informações de média móvel, marque a caixa de seleção Saída de gráfico.
(Opcional) Indique se você deseja obter informações de erro padrão calculadas.
Se você quiser calcular os erros padrão dos dados, marque a caixa de seleção Erros padrão. O Excel coloca valores de erro padrão ao lado dos valores da média móvel. (A informação de erro padrão entra em C2: C10.)
Depois de concluir a especificação de quais informações de média móvel você deseja calcular e onde deseja colocá-las, clique em OK.
O Excel calcula informações de média móvel.
Nota: Se o Excel não tiver informações suficientes para calcular uma média móvel para um erro padrão, ele colocará a mensagem de erro na célula. Você pode ver várias células que mostram essa mensagem de erro como um valor.

Sistema de negociação médio móvel excel
Antes de mergulhar no conteúdo, confira este vídeo sobre como mover estratégias de crossover comuns. O vídeo é um grande precursor das estratégias e.
Top 6 Bollinger Bands® Trading Strategies.
Bollinger Bands Explained Video Confira este vídeo rápido em bandas de bollinger. O vídeo ajudará você a se familiarizar com o indicador e com o pr.
Salário de troca do dia - quanto dinheiro você pode realmente fazer?
Por favor, dedique um tempo para assistir este vídeo na sua totalidade. O que você notará é que eu decompuo o quanto você pode fazer baseado em negociação para (1) a c.
Use suporte de longo prazo e níveis de resistência para o comércio de dia com um limite | Lições de Vídeo Tradingsim.
Pessoal, esse padrão continua repetindo-se uma e outra vez. Se vocês assistiram aos vídeos que estamos montando, vocês têm ele.
Lacunas de ganhos no dia da negociação | Lições de Vídeo Tradingsim.
Oi pessoal, é Kunal da Tradingsim. A temporada de ganhos está aqui! Este é o período de tempo em que os negociadores de momentum se dão bem com o estoque de muitas histórias.
Dia negociando um aperto curto | Lições de Vídeo Tradingsim.
Uma das configurações de negociação mais poderosas é o short squeeze. Um aperto curto ocorre quando você tem um comércio lotado no lado mais curto. Aqui está o k.
Day Trading Parabolic Ações | Lições de Vídeo Tradingsim.
Hoje, iríamos cobrir outro estoque parabólico de baixa flutuação, o OPTT. Houve muitos desses tipos de negociações nas últimas duas semanas. Veja ou.
Aprenda como identificar e trocar o dia de uma armadilha de touros | Lições de Vídeo Tradingsim.
Eu vi um grande exemplo comercial que tive que compartilhar com vocês; Vamos percorrer como trocar o dia de uma armadilha de touros. Como muitos de vocês sabem, Valea.
Suporte de Negociação Diária e Níveis de Resistência | Lições de Vídeo Tradingsim.
Oi pessoal, eu coloquei um vídeo rápido juntos em uma grande negociação a partir do início da semana. O comércio ilustra como você pode usar o suporte e a resistência principais.
Aprenda como o dia de comércio de um estoque com um catalisador de notícias | Lições de Vídeo Tradingsim.
Você quer aprender como negociar uma ação com um catalisador de notícias? Neste exemplo, estamos cobrindo um boato de compra ou aquisição da HOG: Harley Davi.
Day Trading High Momentum Ações | Lições de Vídeo Tradingsim.
O amplo mercado acionário fez uma recuperação feroz dos baixos do BREXIT. Foi um comício de mercado de base ampla que essencialmente refez tudo isso.
Day Trading UVXY Contra S & P500 | Lições de Vídeo Tradingsim.
Traders, notei uma correlação interessante entre o UVXY e os movimentos de preços no S & amp; P 500. Muitas vezes, os comerciantes estão negociando o dia UVXY a.
Day Trading um Breakdown Intervalo de Abertura | Lições de Vídeo Tradingsim.
O intervalo de abertura Breakdown (ORB) Uma das minhas configurações de negociação do dia favorito é um intervalo de intervalo de abertura em uma lacuna de manhã. O que eu procuro no ORB é.
Dia negociando um estoque parabólico de baixa flutuação | Lições de Vídeo Tradingsim.
Negociar ações com baixo nível de flutuação é um sonho que os day traders sonham, especialmente quando há um evento de notícias para desencadear uma corrida, é como jogar gasolina em um incêndio. Thes
Revisão do comércio de uma diferença salarial | Lições de Vídeo Tradingsim.
Este é o Kunal do Tradingsim. Nós recebemos uma tonelada de pedidos de todos vocês na educação de negociação do dia. Eu queria experimentar criando vídeos w.
6 melhores estratégias de negociação de ação de preço.
alton-hill-jr. wistia / medias / 2pixul88bf? embedType = assíncrono & videoFoam = true & videoWidth = 350 Visão geral dos gráficos de ação de preço Se você navegar por nós.
8 coisas a considerar ao usar listas de ações mais ativas.
alton-hill-jr. wistia / medias / a873x4vrgp? embedType = seo & amp; videoFoam = true & amp; videoWidth = 640 Destaques da hist�ica Foque em exist�cias de volume elevado t.
Como usar o indicador Average True Range.
alton-hill-jr. wistia / medias / 09wm0pdl5s? embedType = seo & videoFoam = true & amp; videoWidth = 640 Destaques da história A média do alcance verdadeiro (ATR) .
Ações abaixo de 5 dólares - 12 razões para ficar longe.
alton-hill-jr. wistia / medias / yuxl3bmxzv? embedType = assíncrono & videoFoam = true & videoWidth = 350 1. Você está pronto para a Volatilidade? Eu carinhosamente.
7 maneiras de encontrar as melhores ações para o comércio do dia.
alton-hill-jr. wistia / medias / fc4ho8vd5i? embedType = assíncrono & videoFoam = true & videoWidth = 350 Existem milhares de ações que você pode negociar em qualquer.
Primeira hora de negociação - estratégias simples para lucros consistentes.
alton-hill-jr. wistia / medias / zauge55n3h? embedType = assíncrono & videoFoam = true & videoWidth = 350 Supondo que você tenha começado a negociação do dia ou seja.
Melhor Média Móvel para Day Trading.
Por que as médias móveis são boas para o dia de negociação Manter as coisas simples O dia de negociação é um jogo rápido. Você pode estar pronto em um segundo e depois dar b.
Quantos monitores eu preciso para o dia de negociação.
alton-hill-jr. wistia / medias / bqb95pycqt? embedType = assíncrono & videoFoam = true & videoWidth = 350 Deixe-me começar dizendo que no meu pico eu tinha.
Dia Negociando Caudas Inferiores para Lucros.
A formação de cauda de fundo é um padrão de inversão de tendência que vem no final de um movimento para baixo. Abaixo está a configuração do padrão bottom tail: There.
Quanto dinheiro eu preciso para começar o dia de negociação para viver?
alton-hill-jr. wistia / medias / ni2h9znhxc? embedType = assíncrono & amp; videoFoam = verdadeiro & amp; videoWidth = 350 Então, você está olhando para enfrentar a troca do dia como.
4 estratégias de negociação de volume simples.
Por que o volume é importante? A análise de volume é a técnica de avaliar a saúde de uma tendência, baseada na atividade volumétrica. O volume é um dos ol.
Day Trading Breakouts - 4 estratégias de negociação simples.
Você é um comerciante de dia? Se sim, então você definitivamente vai achar este artigo útil quando você começar a navegar pelo mundo das fugas do dia. Hoje somos goi.
Como negociar com a média móvel simples.
Como negociar com a média móvel simples.
Top 6 Bollinger Bands® Trading Strategies.
Salário de troca do dia - quanto dinheiro você pode realmente fazer?
Use suporte de longo prazo e níveis de resistência para o comércio de dia com um limite | Tradingsim Video Lessons.
Day trading earnings gaps | Tradingsim Video Lessons.
Day Trading a Short Squeeze | Tradingsim Video Lessons.
Day Trading Parabolic Stocks | Tradingsim Video Lessons.
Learn how to identify and day trade a bull trap | Tradingsim Video Lessons.
Day Trading Support and Resistance Levels | Tradingsim Video Lessons.
Learn How to Day Trade a Stock with a News Catalyst |Tradingsim Video Lessons.
Day Trading High Momentum Stocks | Tradingsim Video Lessons.
Day Trading UVXY Against S&P500 | Tradingsim Video Lessons.
Day Trading an Opening Range Breakdown | Tradingsim Video Lessons.
Day Trading a Low Float Parabolic Stock | Tradingsim Video Lessons.
Trade review of an earnings gap down | Tradingsim Video Lessons.
6 Best Price Action Trading Strategies.
8 Things to Consider when using Most Active Stocks Lists.
How to Use the Average True Range Indicator.
Stocks Under 5 Dollars - 12 Reasons to Stay Away.
7 Ways to Find the Best Stocks to Day Trade.
First Hour Trading - Simple Strategies for Consistent Profits.
Best Moving Average for Day Trading.
How Many Monitors Do I Need for Day Trading.
Day Trading Bottom Tails for Profits.
How Much Money do I need to start Day Trading for a Living?
4 Simple Volume Trading Strategies.
Day Trading Breakouts - 4 Simple Trading Strategies.
Before you dive into the content, check out this video on moving average crossover strategies. The video is a great precursor to the strategies and more advanced topics detailed in this article.
Learn to Day Trade the Right Way: : See how you can learn to to trade stocks, futures and bitcoin risk-free.
So, what is the simple moving average? Once you begin to peel back the onion, the simple moving average is anything but simple.
This article will cover a host of topics; to name a few, we will discuss the simple moving average formula, popular moving averages (5, 10, 200), some real-life moving average examples and a few crossover strategies, and my personal experience with the indicator.
There are a few additional resources I would like to point out before you proceed with the article; (1) Trading Simulator (you will need to practice what you have learned) and (2) additional moving average articles to get a broader understanding of the averages (Displaced Moving Average, Exponential Moving Average, Triple Exponential Moving Average).
Simple Moving Average Formula.
The simple moving average (SMA) is the most basic of the moving averages used for trading. The simple moving average formula is calculated by taking the average closing price of a stock over the last "x" periods.
Let's take a look at a simple moving average example with MSFT. The last five closing prices for MSFT are:
To calculate the simple moving average formula you divide the total of the closing prices and divide it by the number of periods.
5-day SMA = 143.24/5 = 28.65.
I love the fact the SMA is just math.
I mean every indicator is based on math, but it's not some proprietary calculation with trademark requirements.
It's simple addition and divsion, for the entire world to share.
Generally speaking in life, the things that are of most value are given as gifts to help the world become a better place.
Popular Simple Moving Averages.
Popular Simple Moving Averages.
In theory there are an infinite number of simple moving averages.
If you are thinking you will come up with some weird 46 SMA to beat the market let me stop you now. It is important to use the most common SMAs as these are the ones the majority of traders will be using on a daily basis.
While I do not advocate you following everyone else, it is important to know what other traders are looking at for clues. Below are the most common SMAs used in the market:
5 - SMA - For the hyper trader. This shorter the SMA the more signals you will receive when trading. The best way to use a 5-SMA is as a trade trigger in conjunction with a longer SMA period.
10-SMA - popular with the short-term traders; great for swing traders and day traders.
20-SMA - the last stop on the bus for short-term traders. Beyond 20-SMA you are basically looking at primary trends.
50-SMA - used by traders to gauge mid-term trends.
50 period simple moving average.
200-SMA - welcome to the world of long-term trend followers. Most investors will look for a cross above or below this average to represent if the stock is in a bullish or bearish trend.
200-period simple moving average.
Basic Rules for Trading with the SMA.
Basic Rules for Trading with the SMA.
Most traders will tell you to trade simple moving average crossovers and the profits will fall from the heavens.
Unfortunately, this is not accurate. Oftentimes stocks will tick over or under moving averages to only continue in the primary direction. This will leave you on the wrong side of the market and down on your position. Below are a few ways to make money trading the SMA.
This will leave you on the wrong side of the market and down on your position. Below are a few ways to make money trading the SMA.
Now that I have given you enough doubt before even attempting to trade with the simple moving average, let's review a few ways to make money with the SMA.
Going with the Primary Trend.
Look for stocks that are breaking out or down strongly Apply the following SMAs 5,10,20,40,200 to see which setting is containing price the best Once you have identified the correct SMA, wait for the price to test the SMA successfully and look for price confirmation that the stock is resuming the direction of the primary trend Enter the trade on the next bar.
Fade the Primary Trend Using Two Simple Moving Averages.
Locate stocks that are breaking out or down strongly Select two simple moving averages to apply to the chart (ex. 5 and 10) Make sure the price has not been touching the 5 SMA or 10 SMA excessively in the last 10 bars Wait for the price to close above or below both moving averages in the counter direction of the primary trend on the same bar Enter the trade on the next bar.
Real-Life Example going with the primary trend using the SMA.
The simple moving average is probably one of the most basic forms of technical analysis. Even hard core fundamental guys will have a thing or two to say about the indicator.
A trader has to be careful since there are an unlimited number of averages you can use and then you throw the multiple time frames in the mix and you really have a messy chart.
Below is a play-by-play for using a moving average on an intraday chart. In the below example, we will cover staying on the right side of the trend after putting on a long position.
The below chart is from TIBCO (TIBX) on June 24, 2011.
I know this is a few years ago, but the market is destined to repeat prior setups; it's all human nature at the end of the day.
Simple Moving Average Example.
Notice how the stock had a breakout on the open and closed near the high of the candlestick. A breakout trader would use this as an opportunity to jump on the train and place their stop below the low of the opening candle. At this point, you can use the moving average to gauge the strength of the current trend. In this chart example, we are using the 10-period simple moving average.
In this chart example, we are using the 10-period simple moving average.
Simple Moving Average - When to Sell.
Now looking at the chart above, how do you think you would have known to sell at the $26.40 level using the simple moving average?
Let me help you out here. You would have had no clue.
Far too many traders have tried to use the simple moving average to predict the exact sell and buy points on a chart. A trader might be able to pull this off using multiple averages for triggers, but one average alone will not be enough.
So save yourself the time and headache and use the averages to determine the strength of the move.
Now take another look at the chart. Do you see how the chart is starting to rollover as the average is starting to flatten out?
A breakout trader would want to stay away from this type of activity since the money in this example grows as the stock increases in price. Now again, if you were to sell on the cross down through the average, this may work some of the time, but over time you will end up losing money after you factor in commissions.
If you don't believe me, try simply buying and selling based on how the price chart crosses up or under a simple moving average. Remember, if it was that easy, every trader in the world would be making money hand over fist.
Flat Simple Moving Average.
Let's take another look at the simple moving average and the primary trend. I like to call this the holy grail setup.
This is the setup you will see in books and seminars. Simply buy on the breakout and sell when the stock crosses down beneath the price action.
The below is an intraday chart of Sina Corporation (SINA) from June 24, 2011. Look at how the price chart stays cleanly above the 20-period simple moving average.
Simple Moving Average - Perfect Example.
Isn't that a beautiful chart? You buy on the open at $80 and sell on the close at $92.
A quick 15% profit in one day and you didn't have to lift a finger.
The brain is a funny thing. I remember seeing a chart like this when I first started out in trading and then I would buy the setup that matched the morning activity.
I would look for the same type of volume and price action, only to later be smacked in the face by reality when my play did not trend as well.
This is the true challenge with trading, what works well on one chart, will not work well on the other. Remember, the 20-SMA worked well in this example, but you can not build a money making system off one play.
Real-Life Example going against the primary trend using the SMA.
Another way to trade using the simple moving average is to go counter to the trend. One of the more higher probability plays is to counter.
One of the higher probability plays is to go counter to extreme gap moves. There have been a number of studies regarding gaps. Depending on the period in the stock market (60s flat line, late 90s boom, or volatility of the 2000s) it's a safe assumption that gaps will fill 50% of the time. Another validation a trader can use when going counter is a close under or over the simple moving average. In the example below, FSLR had a solid gap of.
4%. After the gap, the stock trended up strongly.
Another validation a trader can use when going counter is a close under or over the simple moving average. In the example below, FSLR had a solid gap of.
4%. After the gap, the stock trended up strongly.
You have to be very careful with counter trade setups. If you are on the wrong side of the trade, you and others with the same position will be the fuel for the next leg up.
Let's fast forward a few hours on the chart.
FSLR Short Trend.
Whenever you go short and the stock does little to recover and/or the volatility dries up, you are in a good spot. Notice how FSLR continued lower throughout the day; unable to put up a fight. Now let's jump forward one day to July 1, 2011.
Guess what happened?
You got it, the gap filled.
FSLR Gap Filled.
Simple Moving Average Crossover Strategy.
Simple Moving Average Crossover Strategy.
The moving averages by themselves will give you a great roadmap for trading the markets.
But what about moving average crossovers as a trigger for entering and closing trades? Let me take a clear stance on this one and say I'm not a fan of this strategy.
First, the moving average by itself is a lagging indicator, now you layer in the idea that you have to wait for a lagging indicator to cross another lagging indicator is just too much delay for me.
If you look around the web, one of the most popular simple moving averages to use with a crossover strategy is the 50 and 200 day. When the 50 simple moving average crosses above the 200 simple moving average it generates a golden cross.
Conversely, when the 50-simple moving average crosses beneath the 200-simple moving average it creates a death cross.
I only mention this so you are aware of the setup, which may be applicable for long-term investing. Since Tradingsim focuses on day trading let me at least run through some basic crossover strategies.
Moving Average Crossovers and Day Trading.
Two Simple Moving Average Crossover Strategies.
The first thing to know is you want to pick two moving averages that are somehow related to each other.
For example, 10 is half of 20. Or the 50 and 200 are the most popular moving averages for longer term investors.
The second thing is coming to understand the trigger for trading with moving average crossovers. A buy or sell signal is triggered once the smaller moving average crosses above or below the larger moving average.
Buying on a Cross Up.
In the below charting example of Apple from 4/9/2013, the 10-period SMA crossed above the 20-period SMA. You will notice that the stock had a nice intraday run from $424 up to $428.50.
Isn't that just a beautiful chart? The 10-period SMA is the red line and the blue is the 20-period. In this example, you would have bought once the red line closed above the blue which would have given you an entry point slightly above $424.
Selling a Cross Down.
Let's take a look when a sell action is triggered. In this example, a sell action was triggered when the stock gapped down on 4/15/2013.
Now in both of these examples, you will notice how the stock conveniently went in the desired direction with very little friction.
Well, this is the furthest thing from reality. If you look at moving average crossovers on any symbol you will notice more false and sideways signals than high return ones. This is because most of the time stocks on the surface move in a random pattern.
Remember people, it is the job of the big money players to fake you out at every turn in order to separate you from your money.
With the rise of hedge funds and automated trading systems, for every clean crossover play I find, I can probably show you another dozen or more that don't play out well. This again is why I do not recommend the crossover strategy as a true means of making money day trading the markets.
My Personal Journey Day Trading Simple Moving Averages.
Now that you have all the basics, let me walk you through my experience day trading with simple moving averages.
My Journey Day Trading with Simple Moving Averages - Infographic.
You could be saying to yourself, "Why do I care about this guy's experience? Mine will be different?"
In theory, yes, but there are likely parallels between our paths and I can hopefully help you avoid some of my mistakes.
It was spring 2007 and I was just starting out in day trading.
I felt like volume and moving averages were all I needed to keep me safe when trading. I read all of the books and browsed tons of articles on the web from top "gurus" about technical analysis.
I then took a look at the charts and from what I could see, price respected the 10-period moving average all the time.
I didn't know at this point you see what you want to in charts and for every winning example, there are likely dozens that have failed.
I felt that if the stock closed below the simple moving average and I was long, I should look to get out. But, if the stock could stay above the average, I should just hold my position and let the money flow to me.
Let's walk through a few chart examples to really get a feel for my delusions of grandeur.
Riding the Simple Moving Average.
I'm not even going to worry about giving you the ticker of the above chart because it's honestly irrelevant.
The point is that I just saw hundreds and I mean hundreds of charts with this pattern.
The pattern I was fixated on was a cross above the 10-period moving average and then a rally to the moon.
I remember feeling such excitement of how easy it was going to be to make money day trading this simple pattern.
Now, shifting gears for a second; anyone that knows me knows that I have a strong analytical mind.
I will review the numbers and then run them all again to make sure everything nets out.
Hence is my second phase on this journey.
#2 - Three Lines.
At this point in my journey, it's about the summer of 2007. I am placing some trades and trying different systems, but nothing with great success.
I am using the 10-period simple moving average in conjunction with bollinger bands and a few other indicators.
I don't have the spaghetti chart just yet, but it's a little busy.
So, after reviewing my trades, I, of course, came to the realization that one moving average is not enough on the chart.
The need to put more indicators on a chart is always the wrong answer for traders. But, we must go through this process in order to come out of the other side.
I felt that if I combined a short-term, mid-term and long-term simple moving average, I could quickly validate each signal.
I would use the short=term to pull the trigger when it crossed above or below the mid-term line, mid-term as a means to validate the short-term trigger and the long-term to ensure I was on the right side of the trend.
Did that just confuse you a little?
Let's illustrate this through the chart.
Three Simple Moving Averages - My Journey.
In the above example, the blue line is a 5-period SMA, the red line is a 10-period SMA and the purple line is a 20-period SMA.
You, of course, are welcomed to use any setting that works best for you, but the point is each moving average should be a multiple or two from one another to avoid chaos on the chart.
I used the shortest SMA as my trigger average. When it crossed above or below the mid-term line I would have a potential trade.
The sign I needed to pull the trigger was if the price was above or below the long-term moving average.
So, going back to the chart the first buy signal came when the blue line crossed above the red and the price was above the purple line. This would have given us a valid buy signal.
Then after a nice profit, once the short line crossed below the red line, it was our time to get out.
Did this mean we should have gotten short?
No. Notice that the price was still above the purple line (long-term), so no short position should have been taken.
This way we were not always in a long or short position, just because the price is closing above or below a moving average.
Looking back many years later, it sounds a bit confusing, but I do have to compliment myself on just having some sort of a system.
How do you think this all played out?
Don't worry, I'm going to tell you now.
#3 - Buy and Sell Signals.
At this point of my journey, I am still in a good place. That's what I was hoping to represent with the green smiley faces. The green also represents the expectation of the money flow as well.
It's around late summer at this point and I was ready to roll out my new system of using three simple moving averages.
It became apparent to me rather quickly that this was much harder than I had originally anticipated.
First off, it was tough trying to figure out which stocks to pick.
Once I landed on trading volatile stocks, they either gave false entry signals or did not trend all day.
This level of rejection from the market cut deeply. I remember staring at the screen thinking, "Why is this not working?"
Charts began to look like the one below and there was nothing I could do to prevent this from happening.
What do you think I did next?
That's right, my analytical side kicked in and I needed to review more data.
#4 Settings.
Anyone that has been trading for longer than a few months using indicators at some point has started tinkering with the settings. Well, I took that concept to an entirely different level.
I was using Tradestation at the time trading US equities and I began to run combinations of every time period you can imagine.
I would then run Tradestation's report optimizer to see how things would have worked out.
45 simple moving average.
Two-period simple moving average.
As you can see, these were desperate times. I was running all sorts of combinations until I felt I landed on one that had decent results.
Now, one point to note, I was running these results against one stock at a time.
The goal was to find an Apple or another high volume security I could trade all day using these signals to turn a profit.
Similar to my attempt to add three moving averages after first settling with the 10-period as my average of choice, I did the same thing of needing to add more validation checks this time around as well.
So, instead of just moving forward with the settings I had discovered based on historical data (which is useless the very next day, because the market never repeats itself), I wanted to outsmart the market yet again.
My path to this edge was to displace the optimized moving averages.
This must be painful to read, it surely is painful for me to relive this experience.
It's important to note that I was feeling pretty good after all this analysis. I felt that I had addressed my shortcomings and displacing the averages was going to take me to the elite level.
#5 Displace.
For those of you not familiar with displaced moving averages, it's a means for moving the average before or after the price action.
You can offset the number of periods higher to give the stock a little more wiggle room.
Conversely, you can go negative on the offset to try and jump the trend.
I'm not going to drain this concept in this article, as the focus of this discussion is around simple moving averages.
The point is, I felt that using the averages as a predictive tool would further increase the accuracy of my signals. This way I could jump into a trade before the breakout or exit a winner right before it fell off the cliff.
To illustrate this point, check out this chart example where I would use the same simple moving average duration, but I would displace one fo the averages to jump the trend.
Displaced Moving Average Sell Signal.
The reality is that I would jump into trades that would never materialize or exit winners too soon before the real pop.
This, of course, left me feeling completely broken and lost. I don't say that lightly.
I mean the feeling of despair was so real. You feel like quitting, to be honest.
I think this feeling of utter disgust and wanting to never think about trading again is part of the journey to consistent profits.
Going back to my journey, at this point it was late fall, early winter and I was just done with moving averages. This is clearly reflected in my red unhappy face.
#6 More Indicators.
This is the awful curse of technical analysis.
Technical indicators and systems lead to more indicators to try and crack the ever elusive stock market.
I too fell victim to this horrible symptom of pain from the markets.
This was by far my darkest period of the journey with moving averages.
Not in terms of losses, but just in feeling lost with my trading system and overall confidence.
I would try one system one day and then abandon it for the next hot system. This process went on for years as I kept searching for what would work consistently regardless of the market.
This included me trying every indicator from bollinger bands, macd, slow stochastics - you name it, I tried it.
If you get anything out of this article, do not make the same mistake I did with years of worthless analysis. You will make some traction, but it's a far better use of your time to zone in on yourself and how you are perceiving the market.
#7 - 20 Period Simple Moving Average.
After many years of trading, I have landed on the 20-period simple moving average. At times I will fluctuate between the simple and exponential, but 20 is my number.
This is because I have progressed as a trader from not only a breakout trader, but also a pullback trader.
I use the 20-period moving average as a means to gauge market direction, but not as a trigger for buying or selling.
It all comes down to my ability to size up how a stock is trading in and around the average.
At times a stock will crack right through the average, but I don't panic that a sell-off is looming. I just wait and see how the stock performs at this level.
It's funny to think that I have essentially reverted back to exactly what I was looking at over 10 years ago - one average.
You may ask "Are you upset that it took you this long to come to this conclusion?"
Absolutely not. It wasn't all death and gloom along the way and the simple moving average is just one component of my trading toolkit.
In other words, mastering the simple moving average was not going to make or break me as a trader.
However, understanding how to properly use this technical indicator has positioned me to make consistent profits.
So How Do You Trade with the Simple Moving Average?
4 Key Takeaways.
I'm hoping at this point in the article you are able to answer this question.
If you haven't already figured it out, the simple moving average is not an indicator you can use as a standalone trigger.
Now, that doesn't mean that the indicator can't be a great tool for monitoring the direction of a trend or helping you determine when the market is getting tired after an impulsive move.
Think of the SMA as a compass. If you want detailed coordinates you will need other tools, but you at least have an idea of where you are headed.
I know for you the conceptual points are not enough, so let's get literal:
Only use one simple moving average Do not make buy or sell signals based on the price closing above or below the simple moving average You should use the simple moving average, as the indicator is arguably the most popular technical analysis tool Focus on observing how the stock interacts with the simple moving average, as this is often a head fake tool for algorithms and more sophisticated traders.

Moving average trading system excel


Arms Index is a volume based technical indicator used by technical analysts for forecasting price. The indicator is a useful tool designed to trade st.
Should Day Traders Care About the Dow Theory?
Dow Theory is one of the most basic concepts of analyzing the markets from a technical perspective. If one were to take any of the certified courses o.
The 5 Best Volatility ETFs for Day Traders.
Volatility is a topic in the stock markets that never really goes way. In fact volatility can be considered to be the constant regardless of which way.
Are There Pure Play Day Trades?
Pure play is a term that one might have come across as part of their active investing strategies. Pure play stocks, as the name suggests are a specifi.
Best Pharma Stocks for Day Traders.
Pharmaceutical companies are some of the most volatile stocks making them ideal for day trading due to the large trading ranges that allows for day tr.
How to Fade Blow-off Tops.
A blow-off top is a technical chart pattern that is identified by a very sharp and rapid increase in a security's price including volume which is foll.
How to Day Trade Using the Gann Square.
The trading concepts used by William Delbert Gann or W. D. Gann as he is fondly called is a name in the financial markets that instantly brings int.
5 Strategies for Day Trading with the Arnaud Legoux Moving Average.
Arnaud Legoux moving average or ALMA for short is a recent addition to the family of moving average technical indicators. Developed by Arnaud Legoux a.
Day Trading E-Mini Futures with Moving Averages.
Moving averages are one of the simplest and universal technical analysis indicators that are widely used across different markets and time frames.
5 Ways You Could Have Day Traded Brexit.
Geo-political risks especially in the developed economies aren't that many. But in the year 2016, that changed as the western world was engulfed in a .
How Well Do Pre-Market Futures Define the Day's Range?
One of the biggest advantages of futures trading is the fact that the futures markets are open nearly 23 hours a day. This continuous market allows tr.
How to Day Trade using the Accumulation Distribution Indicator.
What is the Accumulation Distribution Indicator The accumulation distribution indicator (A/D) is an instrument which gives information about the money.
Rectangle Pattern: 5 Steps for Day Trading the Formation.
Today we will discuss one of the most popular continuation formations in trading – the rectangle pattern. How can something so basic as a rectangl.
Exhaustion Gap: 7 Steps to Recognize and Trade the Pattern.
If you trade the opening bell, then you are quite familiar with the morning gap. What you might not be so accustomed to is the gap that fails and whe.
Two Simple Ways to Day Trade Descending Tops.
What is a Descending Top Pattern? Descending tops develop when the price action produces lower tops between swing lows. As the tops are lowering with.
How to Day Trade the Shooting Star Candlestick Pattern.
What is the Shooting Star Candle? The shooting star is a single bearish candlestick pattern that is common in technical analysis. The candle falls in.
Three Ways to Trade the Opening Range.
The most dynamic and active period of the trading day is the opening range. Since this is the most volatile time frame during the trading day, we beli.
Use Long Term Support and Resistance Levels to Day Trade with an Edge | Tradingsim Video Lessons.
Guys, this pattern keeps repeating itself over and over again. If you guys have watched the videos that we have been putting together, you have he.
Day trading earnings gaps | Tradingsim Video Lessons.
Hi Guys, it's Kunal from Tradingsim. Earnings season is here! This is the period of time where momentum traders do really well as many story stock.
3 Above the Market Trading Strategies that Work.
In this article we will cover three basic trading strategies you can use with above the market order types. You maybe thinking that order types is t.
Day Trading a Short Squeeze | Tradingsim Video Lessons.
One of the most powerful trading setups is the short squeeze. A short squeeze occurs when you have a crowded trade on the short side. Here's the k.
3 Tips for How to Day Trade Ascending Tops.
In today’s article, we will cover ascending tops, which is one of the most reliable chart patterns you can leverage when trading bullish price movem.
How to Day Trade with the Least Square Moving Average.
The least square moving average (LSMA) calculates the least squares regression line for the preceding time periods, thus leading to forward projection.
Day Trading Parabolic Stocks | Tradingsim Video Lessons.
Today, were going to cover another low float parabolic stock, OPTT. There have been many of these types of trades in the last couple weeks. See ou.
5 Steps for How to Successfully Counter Trend Trade.
We have discussed many trend trading strategies on the Tradingsim blog. In this article, we will examine the 5 steps for trading counter trends, whic.
Learn how to identify and day trade a bull trap | Tradingsim Video Lessons.
I saw a great trade example that I had to share with you guys; we are going to walk through how to day trade a bull trap. As many of you know, Valea.
How to Trade the Dead Cat Bounce.
In this article, we will cover the dead cat bounce pattern, which is often a trap for traders looking to get long. I will do a deep dive into how to .
How to Trade with the Hull MA.
What is the Hull Moving Average? In addition to the numerous moving averages in the technical analysis realm, the Hull MA is popular amongst some day .
Balance of Power - Normal and Hidden Divergences.
Balance of Power Don Worden created the balance of power (BOP) indicator in the 1950’s to understand market activity between buyers and sellers. Be.
How to use the Coppock Curve with other Indicators.
Coppock Curve Edwin Sedge Coppock, an economist by profession developed the Coppock Curve in 1965, which is a momentum indicator to identify long-term.
Day Trading Support and Resistance Levels | Tradingsim Video Lessons.
Hi Guys, I've put a quick video together on a great trade from earlier in the week. The trade illustrates how you can use key support and resistance.
Learn How to Day Trade a Stock with a News Catalyst |Tradingsim Video Lessons.
Do you want to learn how to day trade a stock with a news catalyst. In this example, we are covering a buyout or takeover rumor on HOG: Harley Davi.
How to Day Trade with the Know Sure Thing Indicator.
Overview of the KST Indicator The Know Sure Thing (KST) indicator is a two-line indicator similar to the MACD developed by Martin Pring. The oscillato.
Day Trading High Momentum Stocks | Tradingsim Video Lessons.
The broad stock market made a ferocious recovery off of the BREXIT lows. It was a broad based market rally that essentially retraced everything that.
Day Trading UVXY Against S&P500 | Tradingsim Video Lessons.
Traders, I noticed an interesting correlation between the UVXY and the price movements in the S&P 500. Too often, traders are day trading UVXY a.
3 Simple Donchian Channel Trading Strategies.
What are Donchian Channels? Richard Donchian created Donchian Channels, which is a type of moving average indicator and a look alike of other support .
Day Trading an Opening Range Breakdown | Tradingsim Video Lessons.
The Opening range Breakdown (ORB) One of my favorite day trading setups is an opening range breakdown on a morning gap. What I look for in the ORB is .
Trade review of an earnings gap down | Tradingsim Video Lessons.
This is Kunal from Tradingsim. We have received a ton of requests from you all on day trading education. I wanted to experiment by creating videos w.
5 Reasons it's a Bad Idea to Hold Day Trades Overnight.
Are you a day trader? Have you ever considered holding your day trades overnight? Although many traders and investors conduct this practice, today I w.
Price Channels versus Bollinger Bands.
Today we are going to discuss two important tools for identifying support and resistance on any chart – introducing price channels and bollinger ban.
5 Profitable Trading Strategies Using the MACD.
Are you an indicator trader? If yes, then you will enjoy reading about one of the most widely used trading tools – the moving average convergence di.
How to Trade Head and Shoulders Tops and Bottoms.
What are head and shoulders patterns? Head and shoulders tops and bottoms are reversal chart patterns, which can develop at the end of bullish or bear.
How to Trade Rising and Falling Wedges.
What are rising and falling wedges? Rising and falling wedges are a technical chart pattern used to predict trend continuations and trend reversals. I.
How to Trade Triple Bottoms and Triple Tops.
If you are a fan of classic chart patterns, look no further as we will cover two of the most reliable chart formations in this article. What are tripl.
3 Ways to Spot Trend Reversals with the Mass Index.
If you carefully observe any bar chart, you can see that even when the stock price is trending upwards or downwards, the price is actually ranging. Th.
5 Trading Strategies Using the Relative Vigor Index.
What is the Relative Vigor Index? The Relative Vigor Index (RVI or RVGI) is a technical indicator, which anticipates changes in market trends. Many .
5 Ways the True Strength Index Keeps you in Winning Trades.
The True Strength Index (TSI) is a technical indicator that was developed by William Blau in the early 1990’s. While there are many applications for.
3 Trading Indicators to Combine with the Klinger Oscillator.
What is the Klinger Volume Oscillator? The Klinger Volume Oscillator (KVO or KO) is a volume-based indicator, which assists traders to identify a long.
7 Reasons Day Traders Love the VWAP.
Learn How to Day Trade with the VWAP - Video Before we dive into the 7 reasons day traders love the VWAP, let's first take a look at this short.
Tricks You Can Use to Successfully Day Trade with the Williams %R Indicator.
If you are interested in short-term trading such as day trading based on technical analysis, then you would have probably heard about the Williams %R .
4 Tips for How to Trade Leveraged ETFs with the Directional Movement Index.
Just like regular exchange traded funds, a leveraged ETF can get you exposure to a particular sector, but as the name suggests, it uses built in lever.
4 Simple Ways to Trade with the Volume Weighted Moving Average (VWMA)
As stated in its name, the volume weighted moving average (VWMA) is similar to the simple moving average; however, the VWMA places more emphasis on th.
Ichimoku Cloud Breakout Trading Strategy – it's not as complicated as it looks.
What is the Ichimoku Cloud? The Ichimoku Cloud, also known as Ichimoku Kino Hyo is a technical indicator, which consists of five moving averages and a.
6 Best Price Action Trading Strategies.
alton-hill-jr. wistia/medias/2pixul88bf? embedType=async&videoFoam=true&videoWidth=350 Overview of Price Action Charts If you browse the we.
How to Day Trade with the Elder's Force Index.
Overview of Elder's Force Index (EFI) You can never call Alexander Elder a humble guy as he decided that the best name for his indicator would be that.
How to Trade using the Choppiness Index Indicator.
Wouldn't we all love to know when a stock is trending and when it is in flat territory? Close your eyes for a second and imagine a world where you.
3 Strategies for Trading Flags and Pennants.
Flags and pennants are foundational chart patterns of technical analysis. What I mean by this is most technical traders have heard of the patterns.
5 Examples of Keltner Channels versus Bollinger Bands.
I am a self-proclaimed ATR fanatic, yet I have not explored Keltner Channels. The Keltner Channel is a lagging on-chart indicator that uses a combin.
Top 4 Awesome Oscillator Day Trading Strategies.
I don't know about you, but what was Bill Williams thinking when he came up with the name awesome oscillator? With names floating around as complex.
3 Strategies for How to Trade the Cup and Handle Pattern.
The cup and handle pattern is one of the oldest chart patterns you will find in technical analysis. In my experience, it's also one of the more reli.
4 Strategies for How to Use the Volume Oscillator.
Fans of the Tradingsim blog know that I am big on volume. Volume is probably one of the oldest off chart technical indicators you will find in techn.
6 Reasons Not to Trade During the First 30 Minutes.
The first 30 minutes is the most volatile time in the equities market. As a new or even seasoned trader, you will gravitate to the first 30 minute slo.
How to use the NYSE Summation Index as a Trading Guidepost.
Why Care about the NYSE Summation Index Let me first start off by saying that this article will not cover the nuances of how the Summation Index was c.
Day Trading Setups - 6 Classic Formations.
Day trading is all about getting in a rhythm. Over time you will begin to identify day trading setups that consistently work for your trading style.
Can the Turtle Trading System work with Day Trading?
Turtle Trading System vs. Al's Trading System The turtle trading system fascinates me on many levels. First you have two guys (Richard Dennis and W.
First Hour Trading - Simple Strategies for Consistent Profits.
alton-hill-jr. wistia/medias/zauge55n3h? embedType=async&videoFoam=true&videoWidth=350 Assuming you have either started day trading or are.
Best Moving Average for Day Trading.
Why Moving Averages are Good for Day Trading Keeping things Simple Day trading is a fast game. You can be up handily in one second and then give b.
How to Day Trade Buying and Selling Climaxes.
I have written a few articles on trend reversal patterns, but I would like to dive into the topic of buying and selling climaxes when day trading. T.
3 Trades a Day.
When you get up every morning to go to work you know what hours your employer expects you to work. What about your favorite store. For me it's a t.
Day Trading a Two-Day Range Breakout.
A breakout of a range presents an opportunity to get long or short. But how do you know when the range has enough "juice" to generate a trending mov.
Day Trading with Price and Volume.
Price and volume are the oldest indicators you will find in the market. As day traders we are always looking for an edge, hence the endless supply o.
Day Trading the Three Bar Reversal Pattern.
The three bar patterns is one of the more common trading setups. The reason its so common makes it an easy target for newbie traders when they do th.
Day Trading Bottom Tails for Profits.
The bottom tail formation is a trend reversal pattern that comes at the end of a down move. Below is the setup for the bottom tail pattern: There .
Top Tips for How to Day Trade the Cup and Handle Pattern.
Video Example of a Day Trading Cup Breakout The below video breaks down another working example of the Day Trading Cup Breakout. This article is a .
Day Trading Breakouts at the End of the Day.
When you think of day trading breakouts the first time frame that comes to mind is likely the morning. This is a natural first reaction as the morni.
Opening Bell - 2 Simple Trading Strategies.
In this article, I will cover two basic trading strategies you can utilize during the market open. But first, let’s discuss what drives the madnes.
7 Things to Know About Automated Day Trading.
Automated Day Trading Definition Automated day trading is probably one of the most interesting aspects of day trading. It often brings awe and my.
Chaikin Money Flow Indicator - 2 Simple Trading Strategies.
Chaikin Money Flow Indicator Review Illustrated above is a zoomed in screenshot of the Chaikin Money Flow (CMF) index from the Tradingsim platform. .
Simple Strategy for Trading Gap Pullbacks.
Our next strategy, the gap pullback buy, is one of my favorite setups. It allows us to let the morning action play out and enter into a trade with a.
Symmetrical Triangles & Day Trading.
Day trading with the symmetrical triangle formation is a great way to take advantage of late day breakouts. Some traders will look for symmetrical t.
How to Trade Early Morning Range Breakouts.
Every day trading system conforms to intraday breakouts. The reason for this is that in many cases a breakout could predetermine the future price beha.
Morning Reversal Gap Fill.
The morning reversal gap fill is another great trading setup for the first hour of trading, preferably within the first 20 to 30 minutes of trading. .
Day Trading Breakouts - 4 Simple Trading Strategies.
Are you a day trader? If yes, then you will definitely find this article helpful as you begin to navigate the world of day breakouts. Today we are goi.
Day Trade Setup - Three Bar Reversal and Go.
Day Trading Setup - Three Bar Reversal and Go This article is going to discuss a very simple, yet powerful day trading strategy that is used to capit.
Narrowing Range Bars.
Our next day trading strategy stipulates that a series of consecutively smaller ranging bars occurring in a single direction will lead to a revers.
5 Strategies for Day Trading with the Arnaud Legoux Moving Average.
How to Day Trade Using the ARMS Index.
Should Day Traders Care About the Dow Theory?
The 5 Best Volatility ETFs for Day Traders.
Are There Pure Play Day Trades?
Best Pharma Stocks for Day Traders.
How to Fade Blow-off Tops.
How to Day Trade Using the Gann Square.
5 Strategies for Day Trading with the Arnaud Legoux Moving Average.
Day Trading E-Mini Futures with Moving Averages.
5 Ways You Could Have Day Traded Brexit.
How Well Do Pre-Market Futures Define the Day's Range?
How to Day Trade using the Accumulation Distribution Indicator.
Rectangle Pattern: 5 Steps for Day Trading the Formation.
Exhaustion Gap: 7 Steps to Recognize and Trade the Pattern.
Two Simple Ways to Day Trade Descending Tops.
How to Day Trade the Shooting Star Candlestick Pattern.
Three Ways to Trade the Opening Range.
Use Long Term Support and Resistance Levels to Day Trade with an Edge | Tradingsim Video Lessons.
Day trading earnings gaps | Tradingsim Video Lessons.
3 Above the Market Trading Strategies that Work.
Day Trading a Short Squeeze | Tradingsim Video Lessons.
3 Tips for How to Day Trade Ascending Tops.
How to Day Trade with the Least Square Moving Average.
Day Trading Parabolic Stocks | Tradingsim Video Lessons.
5 Steps for How to Successfully Counter Trend Trade.
Learn how to identify and day trade a bull trap | Tradingsim Video Lessons.
How to Trade the Dead Cat Bounce.
How to Trade with the Hull MA.
Balance of Power - Normal and Hidden Divergences.
How to use the Coppock Curve with other Indicators.
Day Trading Support and Resistance Levels | Tradingsim Video Lessons.
Learn How to Day Trade a Stock with a News Catalyst |Tradingsim Video Lessons.
How to Day Trade with the Know Sure Thing Indicator.
Day Trading High Momentum Stocks | Tradingsim Video Lessons.
Day Trading UVXY Against S&P500 | Tradingsim Video Lessons.
3 Simple Donchian Channel Trading Strategies.
Day Trading an Opening Range Breakdown | Tradingsim Video Lessons.
Trade review of an earnings gap down | Tradingsim Video Lessons.
5 Reasons it's a Bad Idea to Hold Day Trades Overnight.
Price Channels versus Bollinger Bands.
5 Profitable Trading Strategies Using the MACD.
How to Trade Head and Shoulders Tops and Bottoms.
How to Trade Rising and Falling Wedges.
How to Trade Triple Bottoms and Triple Tops.
3 Ways to Spot Trend Reversals with the Mass Index.
5 Trading Strategies Using the Relative Vigor Index.
5 Ways the True Strength Index Keeps you in Winning Trades.
3 Trading Indicators to Combine with the Klinger Oscillator.
7 Reasons Day Traders Love the VWAP.
Tricks You Can Use to Successfully Day Trade with the Williams %R Indicator.
4 Tips for How to Trade Leveraged ETFs with the Directional Movement Index.
4 Simple Ways to Trade with the Volume Weighted Moving Average (VWMA)
Ichimoku Cloud Breakout Trading Strategy – it's not as complicated as it looks.
6 Best Price Action Trading Strategies.
How to Day Trade with the Elder's Force Index.
How to Trade using the Choppiness Index Indicator.
3 Strategies for Trading Flags and Pennants.
5 Examples of Keltner Channels versus Bollinger Bands.
Top 4 Awesome Oscillator Day Trading Strategies.
3 Strategies for How to Trade the Cup and Handle Pattern.
4 Strategies for How to Use the Volume Oscillator.
6 Reasons Not to Trade During the First 30 Minutes.
How to use the NYSE Summation Index as a Trading Guidepost.
Day Trading Setups - 6 Classic Formations.
Can the Turtle Trading System work with Day Trading?
First Hour Trading - Simple Strategies for Consistent Profits.
Best Moving Average for Day Trading.
How to Day Trade Buying and Selling Climaxes.
3 Trades a Day.
Day Trading a Two-Day Range Breakout.
Day Trading with Price and Volume.
Day Trading the Three Bar Reversal Pattern.
Day Trading Bottom Tails for Profits.
Top Tips for How to Day Trade the Cup and Handle Pattern.
Day Trading Breakouts at the End of the Day.
Opening Bell - 2 Simple Trading Strategies.
7 Things to Know About Automated Day Trading.
Chaikin Money Flow Indicator - 2 Simple Trading Strategies.
Simple Strategy for Trading Gap Pullbacks.
Symmetrical Triangles & Day Trading.
How to Trade Early Morning Range Breakouts.
Morning Reversal Gap Fill.
Day Trading Breakouts - 4 Simple Trading Strategies.
Day Trade Setup - Three Bar Reversal and Go.
Narrowing Range Bars.
Arnaud Legoux moving average or ALMA for short is a recent addition to the family of moving average technical indicators. Developed by Arnaud Legoux and Dimitrios Kouzis Loukas, the ALMA was created as recently as 2009. Despite being new, the ALMA has quickly caught on to the trading community. The fact that the ALMA is based on the moving average indicator makes it universally acceptable, across different markets and different time frames.
The Arnaud Legoux’s version of moving average technical indicator was designed to address two common drawbacks with the traditional moving averages, responsiveness and smoothness. Anyone who has used a moving average would know that a short term moving average is more responsive, but comes at the risk of being choppy and can result in false signals. On the other hand, a longer term moving average is known to be smoother, but lacks in terms of responsiveness, meaning that price already makes a significant move before the longer term (smoother) moving average catches on.
Learn to Day Trade the Right Way: : See how you can learn to to trade stocks, futures and bitcoin risk-free.
So traders are generally caught between a fast and responsive but prone to false signals moving average, or bear with the long term smoother moving average which is often delayed when it comes to signals.
Technical traders have over the years tried to overcome this method, which is one of the reasons why you find quite a few two moving average strategies, where you essentially have a short term and long term moving average, thus looking to trade based off responsiveness and smoothness. For example, a 50 and 100 day EMA applied to the charts and so on.
The Arnaud Legoux moving average attempts to bridge this gap and thus is expected to show both responsiveness and smoothness at the same time. Interestingly, the Arnaud Legoux moving average applies the moving average twice, once from left to right and the other from right from left with the process said to eliminate price lag or phase shift significantly, a problem that is common to the traditional moving averages.
EMA and ALMA comparison.
The above chart shows a comparison between the traditional 50-period exponential moving average (yellow) and the 50 period ALMA (black) applied to closing prices on the price chart. You can see how the Arnaud Legoux moving average offers a mix of both responsiveness and smoothness at the same time. In most cases in the above example you can see how price interacts first with the ALMA than the exponential moving average.
The Arnaud Legoux Moving Average settings.
Compared to the traditional moving averages, the Arnaud Legoux moving average has some additional settings. Here is a brief breakdown of the parameters.
Arnaud Legoux moving average parameters.
Window size: The Window Size is nothing but the look back period and this forms the basis of your ALMA settings. You can use the ALMA window size to any value that you like, although it is best to stick with the well followed parameters such as 200, 100, 50, 20, 30 and so on based on the time frame of your choosing.
Offset : The offset value is used to tweak the ALMA to be more inclined towards responsiveness or smoothness. The offset can be set in decimals between 0 and 1. A setting of 0.99 makes the ALMA extremely responsive, while a value of 0.01 makes it very smooth.
Sigma: The sigma setting is a parameter used for the filter. A setting of 6 makes the filter rather large while a smaller sigma setting makes it more focused. According to Mr. Legoux, a sigma value of 6 is said to offer good performance.
The picture below shows the parameters and how they all fit in within the Arnaud Legoux moving average formula.
Arnaud Legoux moving average formula.
Now that we have an understanding of the Arnaud Legoux moving average, there are five strategies that you can use or apply to your own existing trading strategies using the ALMA indicator.
1. Trading with the trend using ALMA.
Given the fact that the ALMA is more efficient compared to the regular moving averages and the fact that it is nothing but a trend indicator, the simplest way to use the Arnaud Legoux moving average is to apply it as a trend line indicator. Uptrend is formed when price is trading above the ALMA and a downtrend is seen when price is trading below the ALMA. Additionally, we also make use of the Stochastics oscillator with a setting of 14, 3, 3, and use this to identify oversold and overbought levels within a trend. The overbought and oversold levels are between 20 – 30 and 70 – 80.
In this trading set up, the rules are quite simple. Buy when the Stochastics oscillator is oversold in an uptrend and sell when the Stochastics oscillator is overbought in a downtrend.
ALMA – Trend Following (Sell signal)
The chart above shows a nearly perfect sell signal as price is below the ALMA indicating a downtrend and the Stochastics briefly pulls up close to the overbought level and then falls.
ALMA - Trend following (Buy Signal)
The next chart above shows a buy signal. Here you can see how price dips just a few cents below the ALMA but with the Stochastics in the oversold zone, price quickly starts to reverse and pushes high.
1. Using EMA Buy/Sell Signals.
Another simple approach to trading with the Arnaud Legoux Moving average is to make use of two exponential moving averages added on top of the ALMA indicator. Here, the ALMA (50 period) acts as the main trend filter, meaning that long positions are taken above the ALMA and short positions are taken below the ALMA. The 5 and 10 period exponential moving averages are added on the chart to give early signals to the trend.
Therefore, when the 5/10 EMA triggers a bullish crossover, long signals are taken when price is above the ALMA, likewise, when the 5/10 EMA triggers a bearish crossover, short signals are taken when price is below the ALMA.
Trading with ALMA and 5,10 EMA.
The above chart shows the 5/10 exponential moving average added to the chart with the 50 period ALMA acting as the trend filter. There are two signals shows in the above chart with the arrows marking the entry point after price closes above or below the ALMA. This is a very simple and an open-ended system and traders can further make use of their own methods such as using Parabolic SAR or other indicators to lock in profits at regular intervals.
3. Buy/Sell with two Arnaud Legoux moving average.
What do you get when you trade with two ALMA’s? Smooth trends filter with buy and sell signals. Given the fact the Arnaud Legoux moving average combines both smoothness and responsiveness, the bullish and bearish moving average crossovers can be an effective and simple way to day trade.
Arnaud Legoux moving average crossover signals.
The above chart shows 50 period and 10 period Arnaud Legoux moving averages with the same sigma and offset values. Looking at the peaks and troughs that are formed during the two ALMA crossovers, we can see examples of buy and sell signals. With good money management and booking partial profits, trades can be locked in with frequent profit taking in this rather simple day trading strategy.
4. Trend and Parabolic SAR.
Using the Arnaud Legoux moving average as a trend filter, long and short signals are taken with a trailing stop being employed making use of the Parabolic SAR indicator. The chart below shows two examples of short and long signals generated. In the first short signal example, after price closes below the ALMA and the parabolic SAR plots above the price high, sell signal is opened with the stops trailed to the PSAR values until the trade is stopped out.
Parabolic SAR and ALMA trend filter.
Similarly, you can see a long position where price cuts above the ALMA and the Parabolic SAR plots below the price low. Using these values as the trailing stop levels, we can stay long into the trade until the trade is stopped out.
5. Trading divergence with ALMA.
Another way to day trade with the Arnaud Legoux Moving average is to make use of an oscillator to spot divergences. The chart below shows two examples where we make use of the 14 period Relative Strength Index and the Arnaud Legoux moving average.
In this day trading strategy, divergence forms the initial basis of the trade set up with the ALMA then acting as a trigger. The first short signal is identified when price makes a higher high but the Relative Strength Index plots a lower high. This bearish divergence is later confirmed when price closes below the ALMA, thus triggering a short trade.
The short trade is then exited when price closes above the ALMA. A few bars later, we can see price making a hidden bullish divergence with the higher low in price reflecting in a lower high in price. Once the divergence is formed, we then take a long position after price breaks above the 20 period ALMA indicator.
The stops are trailed either at the ALMA values or using an ATR or the parabolic SAR indicator and the trailing stops are moved until the trade is stopped out with a profit.
Trading divergence with ALMA.
In conclusion, the above five day trading strategies make use of the Arnaud Legoux moving average which forms the central theme to the trading strategies mentioned. The ALMA is an interesting moving average indicator that claims to bring a balance to responsiveness of the indicator to price while being smooth at the same time, a factor that has hitherto remained elusive to most other forms of moving averages.
With moving averages being one of the most central of indicators when it comes to trend following, the improvement in the responsiveness and smoothness offered by the Arnaud Legoux moving average no doubt offers a better way to trade the markets.
The ALMA can be applied to just about any trend or counter-trend following trading strategy and can even replace existing trading strategies that make use of the simple or exponential moving averages. With only three parameters to change, the ALMA can be tweaked for each market to aptly capture the volatility and allow for a better way to trade the market trends.

Backtesting Long Short Moving Average Crossover Strategy in Excel.
Now for those of you who know me as a blogger might find this post a little unorthodox to my traditional style of writing, however in the spirit of evolution, inspired by a friend of mine Stuart Reid (TuringFinance), I will be following some of the tips suggested in the following blog post.
Being a student in the EPAT program I was excited to learn the methodology that others make use of when it comes to backtesting. As usual, we start off in Excel and then migrate to R.
Having previously written a blog series on backtesting on Excel and then moving to R, I was very interested to see a slightly different method used by the QuantInsti team.
Please download the Excel spreadsheet so that you can follow the example as we go along.
“By calculating transaction prices it opens up some very interesting doors for implementing MAE analysis”
The one main difference in the method is that it opens the door for performance metrics like:
Total Positive returns Negative Returns Positive trades Negative trades Hit Ratio Average return MAE (Maximum Adverse Excursion)
But suffers from not being able to plot an equity curve like my original method (that I like to think of us a vectorised backtest), you can however, easily incorporate the equity curve, as I did in this post.
Build the “Hello World” of trading strategies: the “Long Short Moving Average Crossover Strategy”.
Step 1: Get data.
There are several places from which you can get data, however for this example we will get data from Yahoo Finance. I will be building this example using Google as a share. Here is a link to download the price data in Csv file format from Yahoo. Note: Please be sure to order from oldest to newest date.
Price data from Yahoo in CSV file format.
Step 2: Create a column for both the long and the short simple moving average (SMA)
For this example I want you to make use of the 5 and 25 day SMA. For those of you who are new to trading strategies, a SMA is simply the total sum of closing price divided by the number of observations.
2.1) Create the short term SMA (5 days)
Using the following formula in Excel: =AVERAGE(G2:G6)
2.2) Create the long term SMA (25 Days)
Using the following formula in Excel: =AVERAGE(E2:E26)
Step 3: Generate trading signals.
It is at this step where readers will pick up on a major difference from my previous blog posts on building a vectorised backtester. I will incorporate my original methodology in this post as well in order to plot the equity curve.
The next thing we need to do is to generate buy and sell signals.
In the previous day the (5)SMA was below the (25)SMA and in the current day there is a change where the (5)SMA is now above the (25)SMA,
Write the string “BUY” in the current field.
In the previous day the (5)SMA was above the (25)SMA and in the current day there is a change where the (5)SMA is now below the (25)SMA,
Write the string “SELL” in the current field.
Add an empty string “” to the current field.
This is represented in Excel using the following formula:
The SMAs are calculated on closing prices and not adjusted close because we want the trade signal to be generated on the price data and not influenced by dividends paid.
Step 4: Get purchase / selling price of the trade.
In the next column add the following Excel formula: =IF(J26<>””,G27,K26)
The logic is as follows:
If the trade signal column for the previous day (Very important to lag the indicator as to remove look-ahead bias) is not an empty string then make use of the previous price above the current field, else set the current field to the closing price for the day.
Some may argue that you can’t actually get the close for the day but you can if you put your order in at the closing auction, and even after the auction there are some residual orders that you can fill, one of the previous funds I worked for did exactly this.
Step 5: Calculate returns.
Add a column called returns that makes use of the following Excel Formula: =IF(J26=”SELL”,K27/K26-1,IF(J26=”BUY”,1-K27/K26,””))
If the previous day generated a SELL signal then take today’s closing price and divide it by the purchase price and subtract 1.
Else If the previous day generated a BUY signal then add 1 and subtract (today’s closing price and divide it by the purchase price).
This formula calculates the returns for a given trade.
Step 6: Calculate some performance metrics.
Positive returns: =SUMIF(L:L,”>0″) Negative returns: =SUMIF(L:L,”<0″) Positive Trades: =COUNTIF(L:L, “>0”) Negative Trades: =COUNTIF(L:L, “<0”) Hit Ratio =O4/(O4+O5) Average Returns =AVERAGE(L:L)
These aren’t the traditional portfolio performance metrics but by calculating the purchase and selling price it opens up some very interesting doors for implementing maximum adverse excursion analysis that can be used to optimise stop losses.
“Note: I wasn’t able to calculate these metrics in my previous method due to not having recorded the purchase and sale prices of transactions.”
Adding an Equity Curve.
Step 1: Add two new columns for the Daily returns and the natural log daily returns of the share.
For this I will make use of the adjusted closing price as I want dividends paid to be reflected in our strategies equity curve and total return profile.
Formula for Daily Returns is: (Today’s Price / Yesterday’s Price) – 1.
Excel formula: =G3/G2-1.
The formula is use for the natural log daily returns is: LN(Today’s price / Yesterday’s price)
Excel formula: = LN(G3/G2)
Step 2: Calculate the Long or Short holdings signals.
In this column we want to know if we are currently holding a long or a short position. This is represented by 1 for long and -1 for short.
This builds on the moving average cross over strategy by going long if the short term SMA is above the long term SMA and short if the opposite is true.
“Note: you have to lag the signals by one day in order to remove look-ahead bias.”
In this example the Excel formula is as such: =IF(H26>I26, 1, -1)
Step 3: Calculate Strategy ln Daily Returns.
This is the easy part, simply multiply the natural log daily return by the current position.
Excel formula: =R27*S27.
Step 4: Calculate the cumulative returns for both the strategy and the share as if you bought and hold. (Do this to act as a comparison)
The formula to cumulate returns is simple, for LN returns you simply add them using =T27+U26.
Next you need to reverse the natural log using the following formula: =EXP(U27)-1.
And then you need to calculate the stocks cumulative returns:
Excel formula =(1+Q27)*(1+Q26)-1.
Step 5: Plot the returns.
As can be seen from the chart above, this strategy isn’t a profitable one on this particular time frame and share but this.
tutorial’s focus is on building a backtester using Excel Click To Tweet . I would encourage readers to explore other trading strategies by trying to incorporate the RSI indicator to act as a guide on how to size a position.
Next Steps.
Here are a few more trading strategies with example datasheets – Trading with ETF, Candlestick Trading Strategy, Pair Trading Strategy and Black-Scholes Option Pricing Model. If you are a coder or a tech professional looking to start your own automated trading desk, learn automated trading from live Interactive lectures by daily-practitioners. Executive Programme in Algorithmic Trading covers training modules like Statistics & Econometrics, Financial Computing & Technology, and Algorithmic & Quantitative Trading. Enroll now!
Posts relacionados:
10 thoughts on “ Backtesting Long Short Moving Average Crossover Strategy in Excel ”
October 20, 2015.
Thank you for sharing this. It looks to me that there is an error in calculating the strategy daily returns (col S) on days that have a trade signal. You are using the close to close price for the daily return, but on days a trade occurs the opening price needs to be used.
For example the first day there is a position (row 27) the return should us the open price of that day (533.762426) as the entry, not the previous day’s close (531.352374). The daily return should be =-1*(G27/B27-1) which is 1.09%.
October 22, 2015.
Very well spotted. Thank you for pointing that out. That is a mistake I made.
There are two ways to fix this,
1.) Step 4 should make use of the closing price and not the open. (That is often how I run quick tests.) Note: you cant actually buy at the close and the “Blog Flirting with Models” has a great way of addressing this problem with end of day data) blog. thinknewfound/2015/10/building-better-backtests/
2.) Alternatively you can add the following formula to row 27 column S and all the fields below that column.
=IF(R27R26, ((E27/B27)-1)*R27, Q27*R27)
The logic is as follows:
If there is a change in trade signal then:
Calculate the daily return if we bought at the open. formula = (Close price / Open Price) – 1.
& amp; also multiply it by your trade signal.
Simply use the daily returns as before that are calculated from close to close multiplied by the trade signal.
Thank you again for the feedback.
How did you find the article? are there other topics that you would like us to write on?
Hello, Jacques Joubert.
Interesting work. However, I found a mistake. When calculating cum returns on short position, the end capital should depend on the price of entry and exit of the position, but not on what happens in the middle. For example, if you alter G33 to 800, it changes all the data below (one should expect that one-off adverse price rise on short position and thus negative return should be offset by posititve return of returning back to 500-520 range, but that doesn’t happen).
Bull And Bear Investor.
Hi Bull and Bear Investor.
Obrigado por isso. Its because I didn’t make use of the Ln Returns. I will be updating the article over the weekend. The Equity curve doesn’t change that much with the standard returns (its off by 2%) Given you don’t fiddle with the adjusted prices by adding outliers.
But well spotted.
Ok The article has been updated with all of the corrections. Thank you all for the feedback.
January 15, 2017.
how compute average return for RSI or MFI indecator.
Thanks for sharing this, helped me design my SMA quite a bit.
October 20, 2017.
Good to see your post and share the trading logic by using excel. I have tried this for almost two years at home after work. I would like to share some point of view to you to get these strategy improve hence can inspire people while looking this post.
Thanks for some of your idea that inspire me to consider while preparing a back testing system. However, with long term investigation and low efficiency, I start trying to get professional software to run the backtest but still facing a lot of problem. It is really go starting platform to use excel that can strengthen your idea before approaching to expert level.
The Transaction Price shall be open price of next trading day. In reality, we cannot trade close price when the market is closed. Eg, in cell K27, the formula shall be =IF(J26″”,B27,K26) instead of =IF(J26″”,G27,K26).
Also, to improve the SMA parameter, I will use offset function that enable to make fast calculation by just change the parameters. I will add 5 and 25 to cell H2 and I2 respectively. Then the formula for cell H6 will be =IF(ROW()-1<$H$2,"",AVERAGE(OFFSET($E6,0,0,-$H$2,1))) while I6 will be =IF(ROW()-1<$I$2,"",AVERAGE(OFFSET($E6,0,0,-$I$2,1))).
Hope above message helps.
October 24, 2017.
Thank you for your recommendation. It is certainly something that readers can implement if they don’t want to run the analysis on end of day prices. I also like how you used the offset function. I would recommend that you move from Excel into a Python environment and use the Numpy library.
Regarding the end of day close prices. It has been my professional experience that as an institutional investor your broker is able to get a price very close to the closing price, you can add a small slippage expense to transaction costs to account for this in the backtest. Most markets also have a post market trading that brokers can facilitate (but with poor liquidity).
I hope this helps shed some light.
November 1, 2017.
Here is food for thought: if the strategy is consistently a loser, do the opposite.

No comments:

Post a Comment