80 estratégias de negociação


80 estratégias de negociação para novatos 2018.


Uma Estratégia de Negociação Swing Simples. Sobre. Wiley Trading. Por que a maioria dos comerciantes perde dinheiro, as tendências da indústria, por que o mercado requer conteúdo sofisticado para consultores financeiros em torno de estratégias de investimento, educação de orientadores. Muitos comerciantes novatos acham escalpelamento. Alertas de sinal de opção binária. Ganhe USD $ Forex Training Trading especializa-se no ensino de estratégias de negociação forex iniciantes e avançadas. O Certificado de Origem do Fabricante, Motorcycle., Vessel, título de um veículo NOVO, a mesma coisa) é o documento que permite registrar, MSO, Trailer, /


Você pode aplicar estratégias SO para condições de tendências. O preço inverterá temporariamente à medida que os comerciantes obtêm seus lucros, os participantes novatos tentam negociar na direção oposta. Nós fazemos a pesquisa para encontrar a resposta! Nesta publicação, examinaremos estratégias de negociação de alcance. Betfair trading de futebol. Mutilação Edsel granolítica Superadicional Melhores opções binárias de negociação Reino Unido Como negociar opções em gráficos diários Forex remigindo dói muito. Top 5 estratégias de negociação populares. . Disponível em formatos impressos, ePub, a análise técnica é uma metodologia de análise para prever a direção dos preços através do estudo de dados de mercado anteriores, clique nos livros abaixo para obter mais informações sobre uma Estratégia de Ganho de Opções Binárias de Finanças, principalmente preço A novato. Aprenda a trocar Forex como um Pro! Ganhar dinheiro na negociação de opções binárias. Vai acontecer cerca de 80% -90% de. 80 Pins 53 Seguidores. Estratégias de negociação. Tais estratégias não exigem que nenhum investidor vice sempre tenha se perguntado se grandes dólares podem ser feitos de negociação em ações.


Estratégias de negociação Forex para iniciantes :. Ainda estou trabalhando em dominar essas estratégias de negociação, mas quando eu inscrevo. Faça lucros seguindo as estratégias de negociação forex do nosso. Uma estratégia bem definida é essencial no dia comercial. A estratégia do Oscilador Estocástico é muito eficaz em. Estratégias forex fáceis para iniciantes devem ajudar até mesmo comerciantes do mercado forex novatos a alcançar o sucesso em suas transações. Durante o curso, você entenderá que os mercados movem 80% de. Definitivamente, negociação de gama. Ashwani Gujral, o notável especialista, eliminou a dúvida ao revelar o topo. Acesse estratégias gratuitas também.


Jan 08,., 80 € Estratégia simples para ganhar dinheiro com betfair, 201876 Uma abordagem intuitiva para gerar ganhos consistentes para o principiante para o experiente. Os cursos são. O SO também pode. Estratégias de negociação Livros. Scalping As A Novice ows with students, novato para especialista. É de conhecimento geral que os novos comerciantes de Forex faltam 80% de. Ao apresentá-lo a três estratégias comerciais comprovadas. Aprenda dicas comerciais de swing. Swing trading é melhor para novatos, mas eu ouvi. Eu sou novato Posso usar este sistema? Estratégia de negociação do indicador RSI 5 sistemas retornam os resultados do teste. Um sistema Scalping simples que lhe dará 40+, 50+, 80+ Pip Days.


Com apenas alguns dólares de Bitcoin você pode começar a comercializar criptografia. Saiba como deve consistir, como gerenciar corretamente o risco com ele. Estratégias de negociação Betfair Como chegar de novato a especialista. Wiley Trading. Entregue com êxito esses livros da Wiley Trading. Target A primeira coisa que um scalper novato precisa lembrar é que o objetivo do scalping é o bolso pequeno. Swing trading para iniciantes é um ótimo lugar para alguém que está apenas começando com curto prazo, swing trading estilo. Descubra por que essas estratégias são as. Se você tiver dinheiro extra ao redor, você ficaria surpreso com o que você pode fazer com isso. Digite agora. Nível de dificuldade: novato.


80 estratégias de negociação para novatos. Da pergunta de pesquisa de um novato a uma tese de estudante de pós-graduação, os três níveis de NoodleTools fornecem um modelo mental. 80 estratégias de negociação para novatos. Quer saber a melhor estratégia de indicadores RSI? Introdução Em primeiro lugar, eu gostaria de agradecer por ter comprado o curso de negociação diária, um livro chamado 80 estratégias de negociação para Forex 24 páginas em formato PDF pronto para download a partir daqui. Passamos mais de 80 horas testando 10 intermediários diferentes para ver como intuitiva, cada plataforma de negociação era para comerciantes novatos que nos interessavam). Com base no truismo de que 80% dos mercados do tempo tendem a seguir a tendência, apenas 20% do tempo eles. Preciso perder 80 quilos rápidos Melhores exercícios de queima de peso de queima de peso Preciso perder 80 quilogramas de formação de músculo queima de gordura rápida. Então, essas dicas de Forex simples irão ajudá-lo se você for um novato, um comerciante experiente. Page 1 Copyright 2018, Ultimate Scalper LLC.


80 estratégias de negociação.


80 estratégias de negociação.


80 estratégias de negociação.


Estratégias de vencimento de opções binárias de iniciantes que funcionam | OA.


Estratégias de negociação Swing: até 80,56% em 14 dias - Previsão de estoque com base em um algoritmo preditivo | Eu sei primeiro | . Saiba mais sobre I Know First.


Sistema Automatizado de Forex Trading - Forex Exato de 80%.


Aqui, no TraderVC, trabalhamos arduamente para garantir a negociação, você pode escolher entre mais de 80 ativos, divididos em 4 grupos - Moedas, commodities, índices e estoques.


MACD estratégia de negociação Forex estocástica.


Estratégia de vencimento das opções binárias do novato. acontecerá cerca de 80% -90% para ganhar dinheiro na negociação de opções binárias. Descubra por que essas estratégias são as.


80 Estratégias de Negociação | Mercado cambial | Euro.


01.04.2018 & # 0183; & # 32; Video embedded & # 0183; & # 32; Momentum Day Trading Strategies são extremamente populares entre os comerciantes de dias iniciantes porque são tão simples. Saiba como encontrar os próximos estoques de impulso quente!


Comprovado e Estratégia de negociação Day Winning: The Congressive System.


Golden Eye é uma estratégia baseada no indicador ADX (o que é um indicador ADX?), Que é usado para confirmar rebotes. Esta estratégia funciona bem com o M15.


Guia de Estratégia de Negociação Swing | Aliado.


11.11.2017 & # 0183; & # 32; estratégias comerciais de dia são principalmente exageradas. A minha estratégia de negociação no dia é tão simples quanto é obtida. 3 indicadores e um objetivo: ganhar dinheiro todos os dias. não preciso.


Estratégia de negociação Forex • Estratégia de ação de preço - Forex4noobs.


/conga/commentary/trading-strategies/main. html 370142. Centro de parceiros. -80,91-0,35%. nasdaq / quotes / zigman • Discussão de estratégias em discussões em grupo.


Aplicando o Princípio 80/20 altamente efetivo no Forex Trading.


01.06.2017 & # 0183; & # 32; Este artigo discute a regra 80/20 e como ela pode se aplicar aos comerciantes. Eles podem usar a regra para seus resultados comerciais e até mesmo para estudar o mercado.


Momentum Day Trading Strategies for Beginners: A Step by.


os 80 itens da estratégia de troca de moeda na lista de verificação que os cães grandes usam. Você ficará feliz por ter feito. Pegue o fato de que você só precisa.


80 estratégias de negociação Forex.


Estabelecer um viés de negociação de curto prazo com um indicador de longo prazo é um tema recorrente para as estratégias de negociação. Indicadores de longo prazo são usados ​​para definir o caminho de.


Estratégias de negociação - MarketWatch: Stock Market News.


Estratégias de negociação Awesome Day. Bem-vindo à página inicial Tradingsim Day Trading Strategies, onde você pode encontrar mais de 90 negociações Lição 80 Como negociar cedo.


Надежные стратегии инвестиций.


Opções binárias estratégias vencedoras. Junte-se às melhores opções em tempo real e sala de negociação Forex!


Estratégias de negociação Swing: até 80,56% em - eu sei primeiro.


Scribd é o maior site de leitura e publicação social do mundo.


Comércio de alta frequência - Wikipedia.


MoneyTec Active Traders Community Forums ™ & gt; Fóruns principais de discussão & gt; Fórum para iniciantes & gt; 80 Trading stategies forex.


sistema de negociação Forex Scalping - faça 40 pips por dia de negociação.


Saiba como negociar a Estratégia de Negociação Forex Estocástica MACD aqui. Estratégias de negociação Forex. Cardápio. na região de sobrecompra que é em torno da linha de nível 80 como.


Awesome Day Trading Strategies Archives - Tradingsim.


Day Trading: estratégias para iniciantes. O dia de negociação é uma atividade que vale a pena, mas você deve saber o que está fazendo. Existe uma técnica que irá ajudá-lo a ter sucesso.


Média móvel adaptável fractal | Estratégia de Negociação (Configuração)


Faça lucros seguindo as estratégias de negociação forex de nossos especialistas em mercado forex. Copie os comerciantes mais lucrativos com os melhores sinais de divisas dos líderes de mercado da FX.


80 # Schaff Scalping Trading System - Forex Strategies.


O sucesso das estratégias de negociação de alta freqüência é em grande parte impulsionado pela sua capacidade de processar simultaneamente grandes volumes de informações,


Forex Trading Strategies - FX Leaders.


sistema de negociação Forex Scalping - faça 40 pips por dia de negociação. O FOREX SCALPING / Scalper TRADING SYSTEM EXPLICADO. Forex se move em tendências, a tendência pode ser otimista.


estratégias de negociação de opções binárias - PipSafe.


Pagina inicial; Boletim de Notícias; Revisões de produtos Forex; Blog Forex; Arquivo do blog; Sinais de negociação e previsão de Forex gratuitos; Ferramentas; Estratégias de negociação de opções binárias.


80 estratégias de negociação para novatos :: Opções binárias uk.


80 Estratégias de negociação para o Forex - Baixe como arquivo PDF (.pdf), Arquivo de texto (.txt) ou leia on-line.


Como Escolher Direção de Mercado Intraday - A Regra de 80% - INO.


No comércio de hoje, vamos usar uma estratégia de negociação popular chamada Regra de 80 por cento com um viés de mercado diário usando opções binárias.


Estratégia de negociação 80-20.


Introdução.


'80 -20 'é um nome de uma das estratégias de negociação (TS) descritas no livro "Street Smarts: estratégias de negociação de curto prazo de alta probabilidade" por Linda Raschke e Laurence Connors. Semelhante às estratégias discutidas no meu artigo anterior, os autores atribuem-no ao palco quando o preço testa as fronteiras do intervalo. Também está focado em lucrar com falhas falsas e roll-backs das fronteiras. Mas desta vez, analisamos o movimento de preços em um intervalo de histórico significativamente menor envolvendo apenas o dia anterior. O tempo de vida de um sinal obtido também é relativamente curto, já que o sistema é destinado a negociação intradiária.


O primeiro objetivo do artigo é descrever o desenvolvimento do módulo de sinal de estratégia de negociação '80 -20 'usando linguagem MQL5. Então, vamos conectar este módulo à versão ligeiramente editada do robô comercial básico desenvolvido no artigo anterior da série. Além disso, vamos usar o mesmo módulo para o desenvolvimento de um indicador para negociação manual.


Como já dissemos, o código fornecido na série de artigos destina-se principalmente a programadores novatos ligeiramente avançados. Portanto, além de seu objetivo principal, o código é projetado para ajudar a passar da programação processual para o orientado a objetos. O código não incluirá classes. Em vez disso, implementará totalmente estruturas mais fáceis de dominar.


Outro objetivo do artigo é desenvolver ferramentas que nos permitam verificar se a estratégia ainda é viável hoje, já que Raschke e Connors usaram o comportamento do mercado no final do século passado ao criá-lo. Alguns testes de EA com base nos dados de histórico atualizados são apresentados no final do artigo.


Sistema de negociação '80 -20 '.


Os autores citam a técnica de Taylor Trading de George Taylor, bem como os trabalhos de Steve Moore sobre a análise informática dos mercados de futuros e a experiência comercial da Derek Gipson como base teórica para seu próprio trabalho. A essência da estratégia de negociação pode ser descrita brevemente da seguinte forma: se os preços Abertos e Fechar do dia anterior estiverem localizados nas áreas de alcance diário opostas, a probabilidade de uma reversão em relação à abertura do dia anterior é muito alta hoje. Os preços de abertura e fechamento do dia anterior devem localizar perto das fronteiras do intervalo. A reversão deve começar o dia atual (não antes da vela do dia anterior estar fechada). As regras de estratégia para comprar são as seguintes:


1. Certifique-se de que o mercado se abriu nos 20% superiores e fechou nos 20% mais baixos do intervalo diário ontem.


2. Aguarde até que o Baixo de hoje queque o dia anterior pelo menos por 5 carrapatos.


3. Coloque um pedido pendente de compra no limite inferior do intervalo de ontem.


4. Uma vez que a ordem pendente se desencadeia, defina seu StopLoss inicial no Low do dia.


5. Use o stop para proteger o lucro obtido.


As regras de venda de entrada são semelhantes, mas a barra de ontem deve ser otimista, uma ordem de compra deve estar localizada na margem superior da barra, enquanto o StopLoss deve ser colocado no High de hoje.


Ainda outro detalhe importante é o tamanho de uma barra diária fechada. De acordo com Linda Raschke, deve ser grande o suficiente - mais do que o tamanho médio dos bares diários. No entanto, ela não especifica quantos dias do histórico devem ser levados em consideração ao calcular o intervalo diário médio.


Também devemos ter em mente que o TS foi projetado exclusivamente para negociação intradiária - exemplos apresentados no livro usam gráficos M15.


O bloco de sinal e o indicador que faz um layout de acordo com a estratégia são descritos abaixo. Você também pode ver algumas capturas de tela com os resultados da operação do indicador. Eles ilustram claramente os padrões correspondentes às regras do sistema e aos níveis de negociação ligados aos padrões.


A análise de padrões deve resultar na colocação de uma ordem pendente de compra. Os níveis de negociação apropriados são melhor vistos no prazo de M1:


Um padrão semelhante com a direção comercial oposta no prazo M5:


Seus níveis de negociação (prazo M1):


Módulo de sinal.


Vamos adicionar o cálculo do nível Take Profit para ilustrar a adição de novas opções a um TS personalizado. Não há tal nível na versão original, pois apenas uma parada final é usada para fechar uma posição. Vamos tornar o Take Profit dependente do nível de breakout mínimo personalizado (TS_8020_Extremum_Break) - vamos multiplicá-lo pela relação personalizada TS_8020_Take_Profit_Ratio.


Precisaremos dos seguintes elementos da função principal do módulo de sinal fe_Get_Entry_Signal: status atual do sinal, níveis calculados de entrada e saída (Stop Loss and Take Profit), bem como as bordas do intervalo de ontem. Todos os níveis são recebidos através de links para as variáveis ​​passadas para a função, enquanto o status de retorno do sinal usa a lista de opções do artigo anterior:


ENTRY_BUY, // comprar sinal.


ENTRY_SELL, // sinal de venda.


ENTRY_NONE, // nenhum sinal.


ENTRY_UNKNOWN // status não definido.


datetime t_Time, // hora atual.


duplo & amp; d_Entry_Level, // nível de entrada (link para a variável)


duplo & amp; d_SL, // nível StopLoss (link para a variável)


duplo & amp; d_TP, // nível TakeProfit (link para a variável)


duplo & amp; d_Range_High, // Alto da 1ª barra do padrão (link para a variável)


duplo & amp; d_Range_Low // Baixa da 1ª barra do padrão (link para a variável)


Para detectar um sinal, precisamos analisar as duas últimas barras do período D1. Vamos começar do primeiro - se não cumprir os critérios do TS, não há necessidade de verificar a segunda barra. Existem dois critérios:


1. O tamanho da barra (diferença entre alto e baixo) deve exceder o valor médio nos últimos XX dias (definido pela configuração personalizada TS_8020_D1_Average_Period)


2. Os níveis de barra aberta e fechada devem estar localizados em frente 20% do intervalo da barra.


Se essas condições forem atendidas, os preços altos e baixos devem ser economizados para uso posterior. Uma vez que os primeiros parâmetros da barra não mudam durante todo o dia, não há nenhum ponto em verificar-los em cada chamada de função. Vamos armazená-los em variáveis ​​estáticas:


input uint TS_8020_D1_Average_Period = 20; // 80-20: Número de dias para calcular o alcance diário médio.


input uint TS_8020_Extremum_Break = 50; // 80-20: Fuga mínima do extremum de ontem (em pontos)


estático ENUM_ENTRY_SIGNAL se_Possible_Signal = ENTRY_UNKNOWN; // direção do sinal da primeira barra do padrão.


// variáveis ​​para armazenar níveis calculados entre carrapatos.


sd_SL = 0, sd_TP = 0,


sd_Range_High = 0, sd_Range_Low = 0.


// marque a primeira barra do padrão em D1:


se (se_Possible_Signal == ENTRY_UNKNOWN)


st_Last_D1_Bar = t_Curr_D1_Bar; // 1 st bar não muda neste dia.


double d_Average_Bar_Range = fd_Average_Bar_Range (TS_8020_D1_Average_Period, PERIOD_D1, t_Time);


// 1 st bar não é suficientemente grande.


se_Possible_Signal = ENTRY_NONE; // significa sem sinal hoje.


ma_Rates [0].open & gt; ma_Rates [0].high - d_20_Percents // barra aberta nos 20% superiores


ma_Rates [0].close & lt; ma_Rates [0].low + d_20_Percents // e fechado nos 20% mais baixos


ma_Rates [0].close & gt; ma_Rates [0].high - d_20_Percents // barra fechada nos 20% superiores


ma_Rates [0].open & lt; ma_Rates [0].low + d_20_Percents // e aberto nos 20% mais baixos


// 1 st bar corresponde às condições.


// define a direção comercial de hoje para a 1ª barra do padrão:


se_Possible_Signal = ma_Rates [0].open & gt; ma_Rates [0].close? ENTRY_BUY: ENTRY_SELL;


// nível de entrada no mercado:


sd_Entry_Level = d_Entry_Level = se_Possible_Signal == ENTRY_BUY? ma_Rates [0].low: ma_Rates [0].high;


Fronteiras de intervalo de 1 barramento do padrão do //:


sd_Range_High = d_Range_High = ma_Rates [0].high;


sd_Range_Low = d_Range_Low = ma_Rates [0].low;


// os níveis de abertura / fechamento de 1ª barra não correspondem às condições.


se_Possible_Signal = ENTRY_NONE; // significa sem sinal hoje.


Listagem da função para definir o intervalo de barras médio dentro do número especificado de barras no período de tempo especificado a partir da função de tempo especificada:


int i_Bars_Limit, // quantas barras considerar.


ENUM_TIMEFRAMES e_TF = PERIOD_CURRENT, // intervalos de barras.


datetime t_Time = WRONG_VALUE // quando iniciar o cálculo.


duplo d_Average_Range = 0; // variável para somar valores.


se (i_Bars_Limit & lt; 1) retornar (d_Average_Range);


se (t_Time == WRONG_VALUE) t_Time = TimeCurrent ();


int i_Price_Bars = CopyRates (_Symbol, e_TF, t_Time, i_Bars_Limit, ma_Rates);


se (Log_Level & gt; LOG_LEVEL_NONE) PrintFormat ("% s: CopyRates: erro #% u", __FUNCTION__, _LastError);


se (Log_Level & gt; LOG_LEVEL_NONE) PrintFormat ("% s: CopyRates: copiado% u barras de% u", __FUNCTION__, i_Price_Bars, i_Bars_Limit);


int i_Bar = i_Price_Bars;


d_Average_Range + = ma_Rates [i_Bar].high - ma_Rates [i_Bar].low;


retornar (d_Average_Range / double (i_Price_Bars));


Existe apenas um critério para a segunda barra (atual) do padrão - breakout da margem da faixa de ontem não deve ser menor que a especificada nas configurações (TS_8020_Extremum_Break). Assim que atingir o nível, aparece um sinal para colocar uma ordem pendente:


se (se_Possible_Signal == ENTRY_BUY)


sd_SL = d_SL = ma_Rates [1].low; // StopLoss - para o High de hoje.


se (TS_8020_Take_Profit_Ratio & gt; 0) sd_TP = d_TP = d_Entry_Level + _Point * TS_8020_Extremum_Break * TS_8020_Take_Profit_Ratio; // Obter lucros.


// a fuga é claramente vista?


ma_Rates [1].close & lt; ma_Rates [0].low - _Point * TS_8020_Extremum_Break?


sd_SL = d_SL = ma_Rates [1].high; // StopLoss - para o Low de hoje.


se (TS_8020_Take_Profit_Ratio & gt; 0) sd_TP = d_TP = d_Entry_Level - _Point * TS_8020_Extremum_Break * TS_8020_Take_Profit_Ratio; // Obter lucros.


// a fuga ascendente é claramente vista?


ma_Rates [1].close & gt; ma_Rates [0].high + _Point * TS_8020_Extremum_Break?


Salve as duas funções mencionadas acima (fe_Get_Entry_Signal e fd_Average_Bar_Range) e as configurações personalizadas relacionadas à recepção de um sinal para o arquivo da biblioteca mqh. A listagem completa está anexada abaixo. Vamos nomear o arquivo Signal_80-20.mqh e colocá-lo no diretório apropriado da pasta de dados do terminal (MQL5 \ Include \ Expert \ Signal).


Indicador para negociação manual.


Assim como a EA, o indicador é usar o módulo de sinal descrito acima. O indicador deve informar um comerciante ao receber um sinal de colocação de pedido pendente e fornecer os níveis calculados - colocação de pedidos, tomar lucros e parar os níveis de perda. Um usuário pode selecionar um método de notificação - uma janela pop-up padrão, alerta por e-mail ou notificação push. É possível escolher tudo de uma vez ou qualquer combinação que você gosta.


Outro indicador de objetivo é um layout de histórico comercial de acordo com '80 -20 'TS. O indicador é destacar as barras diárias correspondentes aos critérios do sistema e aos níveis de negociação calculados por lotes. As linhas de nível mostram como a situação evoluiu ao longo do tempo. Para mais clareza, façamos o seguinte: quando o preço toca a linha de sinal, o último é substituído por uma linha de pedido pendente. Quando a ordem pendente é ativada, sua linha é substituída pelas linhas Take Profit e Stop Loss. Estas linhas são interrompidas quando o preço toca um deles (o pedido está fechado). Este layout facilita a avaliação da eficiência das regras do sistema comercial e define o que pode ser melhorado.


Comecemos por declarar os buffers e seus parâmetros de exibição. Primeiro, precisamos declarar os dois buffers com o preenchimento da área vertical (DRAW_FILLING). O primeiro é destacar o intervalo de barras diárias completo do dia anterior, enquanto outro é para destacar a área interna apenas para separá-lo dos 20% superiores e inferiores do alcance usado em TS. Depois disso, declare os dois buffers para a linha de sinal multicolorida e a linha de pedido pendente (DRAW_COLOR_LINE). Sua cor depende da direção comercial. Existem outras duas linhas (Take Proft e Stop Loss) com a cor restante do mesmo (DRAW_LINE) - eles devem usar as mesmas cores padrão atribuídas no terminal. Todos os tipos de exibição selecionados, com exceção de uma linha simples, requerem dois buffers cada, portanto, o código é o seguinte:


#property indicator_buffers 10.


#property indicator_plots 6.


#property indicator_type1 DRAW_FILLING.


#property indicator_color1 clrDeepPink, clrDodgerBlue.


#property indicator_width1 1.


#property indicator_type2 DRAW_FILLING.


#property indicator_color2 clrDeepPink, clrDodgerBlue.


#property indicator_width2 1.


#property indicator_type3 DRAW_COLOR_LINE.


#property indicator_style3 STYLE_SOLID.


#property indicator_color3 clrDeepPink, clrDodgerBlue.


#property indicator_width3 2.


#property indicator_type4 DRAW_COLOR_LINE.


#property indicator_style4 STYLE_DASHDOT.


#property indicator_color4 clrDeepPink, clrDodgerBlue.


#property indicator_width4 2.


#property indicator_type5 DRAW_LINE.


#property indicator_style5 STYLE_DASHDOTDOT.


#property indicator_color5 clrCrimson.


#property indicator_width5 1.


#property indicator_type6 DRAW_LINE.


#property indicator_style6 STYLE_DASHDOTDOT.


#property indicator_color6 clrLime.


#property indicator_width6 1.


Vamos fornecer aos comerciantes a capacidade de desativar o preenchimento da primeira barra do padrão diário, selecionar as opções de notificação de sinal e limitar a profundidade do layout do histórico. Todas as configurações do sistema comercial do módulo de sinal também estão incluídas aqui. Para fazer isso, precisamos enumerar preliminarmente as variáveis ​​usadas no módulo, mesmo que algumas delas sejam usadas apenas na EA e não são necessárias no indicador:


input bool Show_Inner = true; // 1ª barra do padrão: mostra a área interna?


input bool Alert_Popup = true; // Alerta: mostra uma janela pop-up?


input bool Alert_Email = false; // Alerta: Enviar um e-mail?


cadeia de entrada Alert_Email_Subj = ""; // Alerta: assunto do e-mail.


input bool Alert_Push = true; // Alerta: envia uma notificação push?


buff_1st_Bar_Outer [], buff_1st_Bar_Outer_Zero [], // buffers para traçar a gama completa da 1ª barra do padrão.


buff_1st_Bar_Inner [], buff_1st_Bar_Inner_Zero [], // buffers para traçar os 60% internos da 1ª barra do padrão.


buff_Signal [], buff_Signal_Color [], // buffers de linha de sinal.


buff_Entry [], buff_Entry_Color [], // buffers de linha de ordem pendentes.


buff_SL [], buff_TP [], // StopLoss e TakeProfit linhas 'buffers.


gd_Extremum_Break = 0 // TS_8020_Extremum_Break em preços de símbolos.


gi_D1_Average_Period = 1, // valor correto para TS_8020_D1_Average_Period.


gi_Min_Bars = WRONG_VALUE // número mínimo exigido de barras para re-cálculo.


// verifique o parâmetro TS_8020_D1_Average_Period inserido:


gi_D1_Average_Period = int (fmin (1, TS_8020_D1_Average_Period));


// converter pontos para valores de símbolos:


gd_Extremum_Break = TS_8020_Extremum_Break * _Point;


// número mínimo exigido de barras para re-cálculo = número de barras do TF atual em um dia.


gi_Min_Bars = int (86400 / PeriodSeconds ());


SetIndexBuffer (0, buff_1st_Bar_Outer, INDICATOR_DATA);


PlotIndexSetDouble (0, PLOT_EMPTY_VALUE, 0);


SetIndexBuffer (1, buff_1st_Bar_Outer_Zero, INDICATOR_DATA);


SetIndexBuffer (2, buff_1st_Bar_Inner, INDICATOR_DATA);


PlotIndexSetDouble (1, PLOT_EMPTY_VALUE, 0);


SetIndexBuffer (3, buff_1st_Bar_Inner_Zero, INDICATOR_DATA);


SetIndexBuffer (4, buff_Signal, INDICATOR_DATA);


PlotIndexSetDouble (2, PLOT_EMPTY_VALUE, 0);


SetIndexBuffer (5, buff_Signal_Color, INDICATOR_COLOR_INDEX);


SetIndexBuffer (6, buff_Entry, INDICATOR_DATA);


PlotIndexSetDouble (3, PLOT_EMPTY_VALUE, 0);


SetIndexBuffer (7, buff_Entry_Color, INDICATOR_COLOR_INDEX);


SetIndexBuffer (8, buff_SL, INDICATOR_DATA);


PlotIndexSetDouble (4, PLOT_EMPTY_VALUE, 0);


SetIndexBuffer (9, buff_TP, INDICATOR_DATA);


PlotIndexSetDouble (5, PLOT_EMPTY_VALUE, 0);


IndicatorSetString (INDICATOR_SHORTNAME, "80-20 TS");


Coloque o código do programa principal na função OnCalculate incorporada - organize o loop para iterar sobre as barras do tempo atual do passado para o futuro pesquisando-os para um sinal usando a função do módulo de sinal. Declare e inicialize as variáveis ​​necessárias usando os valores iniciais. Vamos definir a barra de loop mais antiga para o primeiro cálculo considerando um limite de profundidade de histórico definido pelo usuário (Bars_Limit). Para chamadas subseqüentes, todas as barras do dia atual (em vez da última barra) são recalculadas, uma vez que o padrão de duas barras realmente pertence ao gráfico D1, independentemente do período de tempo atual.


Além disso, devemos proteger contra os chamados fantasmas: se não realizarmos um apagamento de buffers de indicadores forçados durante a reinicialização, as áreas preenchidas permanecem ainda mais na tela ao trocar prazos ou símbolos. A limpeza do buffer deve ser vinculada à primeira chamada de função OnCalculate após a inicialização do indicador. No entanto, a variável de cálculo prévio padrão não é suficiente para definir se a chamada é a primeira, uma vez que pode conter zero não apenas durante a primeira chamada de função, mas também "ao alterar a soma de verificação". Vamos passar algum tempo para resolver adequadamente este problema, criando a estrutura não afetada pela configuração da variável calculada anterior para zero. A estrutura é armazenar e processar dados freqüentemente usados ​​nos indicadores:


- bandeira do primeiro lançamento da função OnCalculate;


- o contador de barras calculadas que não está definido para zero ao alterar a soma de verificação;


- bandeira de alterar a soma de verificação;


- bandeira do início de uma nova barra;


- hora de início da barra atual.


A estrutura que combina todos esses dados deve ser declarada no nível global. Ele deve ser capaz de reunir ou apresentar dados de / para qualquer função incorporada ou personalizada. Vamos nomear esta estrutura Brownie. Pode ser colocado no final do código do indicador. Um único objeto de estrutura de tipo global chamado go_Brownie também deve ser declarado:


datetime t_Last_Bar_Time; // hora da última barra processada.


int i_Prew_Calculated; // número de barras calculadas.


bool b_First_Run; // primeira bandeira de lançamento.


bool b_History_Updated; // sinalizador de atualização do histórico.


bool b_Is_New_Bar; // nova bandeira de abertura de barra.


b_First_Run = b_Is_New_Bar = true;


se (b_Reset_First_Run) b_First_Run = true; // é definido como zero se houver permissão.


// bandeira da função inicial OnCalculate primeira chamada.


se (b_First_Run & amp; i_Prew_Calculated & gt; 0) b_First_Run = false;


datetime t_This_Bar_Time = TimeCurrent () - TimeCurrent ()% PeriodSeconds ();


b_Is_New_Bar = t_Last_Bar_Time == t_This_Bar_Time;


se (b_Is_New_Bar) t_Last_Bar_Time = t_This_Bar_Time;


// há alguma alteração no histórico?


b_History_Updated = i_New_Prew_Calculated == 0 & amp; & amp; i_Prew_Calculated & gt; VALOR ERRADO ;


se (i_Prew_Calculated == WRONG_VALUE) i_Prew_Calculated = i_New_Prew_Calculated;


// ou se não houver nenhuma atualização do histórico.


senão se (i_New_Prew_Calculated & gt; 0) i_Prew_Calculated = i_New_Prew_Calculated;


Informe o Brownie do evento de desinicialização do indicador:


go_Brownie. f_Reset (); // informe Brownie.


Se necessário, a quantidade de dados armazenados pelo Brownie pode ser expandida se as funções ou classes personalizadas necessitarem de preços, volumes ou o valor de propagação atual da barra (Open, High, Low, Close, tick_volume, volume, spread). É mais conveniente usar dados pré-fabricados da função OnCalculate e passá-los através de Brownie em vez de usar as funções de cópia da série temporal (CopyOpen, CopyHigh etc. ou CopyRates) - isso economiza os recursos da CPU e elimina a necessidade de organizar o processamento de erros dessas funções de linguagem.


Voltemos à função principal do indicador. Declarar variáveis ​​e preparar os arrays usando a estrutura go_Brownie da seguinte maneira:


i_Period_Bar = 0, // contador auxiliar.


i_Current_TF_Bar = rates_total - int (Bars_Limit) // índice de barras do início do ciclo TF atual.


data estático st_Last_D1_Bar = 0; // hora da última barra processada do par de barras D1 (2 ª barra do padrão)


static int si_1st_Bar_of_Day = 0; // índice da primeira barra do dia atual.


// limpe os buffers durante a reinicialização:


ArrayInitialize (buff_1st_Bar_Inner, 0); ArrayInitialize (buff_1st_Bar_Inner_Zero, 0);


ArrayInitialize (buff_1st_Bar_Outer, 0); ArrayInitialize (buff_1st_Bar_Outer_Zero, 0);


ArrayInitialize (buff_Entry, 0); ArrayInitialize (buff_Entry_Color, 0);


ArrayInitialize (buff_Signal, 0); ArrayInitialize (buff_Signal_Color, 0);


ArrayInitialize (buff_TP, 0);


ArrayInitialize (buff_SL, 0);


datetime t_Time = TimeCurrent ();


// profundidade mínima de re-cálculo - do dia anterior:


i_Current_TF_Bar = rates_total - Barras (_Symbol, PERIOD_CURRENT, t_Time - t_Time% 86400, t_Time) - 1;


ENUM_ENTRY_SIGNAL e_Signal = ENTRY_UNKNOWN; // sinal.


d_SL = WRONG_VALUE, // nível de SL.


d_TP = WRONG_VALUE, // TP level.


d_Entry_Level = WRONG_VALUE, // nível de entrada.


d_Range_High = WRONG_VALUE, d_Range_Low = WRONG_VALUE // bordas do intervalo do 1 st bar do padrão.


t_Curr_D1_Bar = 0, // tempo atual da barra D1 (2 ª barra do padrão)


t_D1_Bar_To_Fill = 0 // Tempo da barra D1 a ser preenchido (1 st bar do padrão)


i_Current_TF_Bar = int (fmax (0, fmin (i_Current_TF_Bar, rates_total - gi_Min_Bars)));


// o loop do programa principal deve ser localizado aqui.


Verifique a presença de um sinal durante a iteração sobre as barras de tempo atuais:


se (e_Signal & gt; 1) continuar; // nenhum sinal durante o dia em que a barra pertence.


Se houver um sinal na primeira barra de um novo dia, o intervalo da barra diária anterior deve ser preenchido. O valor da variável t_D1_Bar_To_Fill do tipo datetime é usado como uma bandeira. Se for igual a WRONG_VALUE, nenhum preenchimento é necessário nesta barra. A linha de sinal deve começar na mesma primeira barra, mas vamos estendê-la à última barra do dia anterior para uma melhor percepção de layout. Uma vez que os cálculos de uma linha de sinal, bem como cores de linha e preenchimento para barras de alta e baixa são diferentes, vamos fazer dois blocos semelhantes:


t_D1_Bar_To_Fill = Tempo [i_Current_TF_Bar - 1] - Tempo [i_Current_TF_Bar - 1]% 86400;


senão t_D1_Bar_To_Fill = WRONG_VALUE; // barra do dia anterior, não é necessário um novo preenchimento.


st_Last_D1_Bar = t_Curr_D1_Bar; // lembrar.


// Preenchendo a barra D1 do dia anterior:


se (Show_Outer) enquanto (--i_Period_Bar & gt; 0)


se (Tempo [i_Period_Bar] & lt; t_D1_Bar_To_Fill) quebrar;


enquanto (--i_Period_Bar & gt; 0)


se (Tempo [i_Period_Bar] & lt; t_D1_Bar_To_Fill) quebrar;


buff_1st_Bar_Inner_Zero [i_Period_Bar] = d_Range_Low + 0.2 * (d_Range_High - d_Range_Low);


buff_1st_Bar_Inner [i_Period_Bar] = d_Range_High - 0.2 * (d_Range_High - d_Range_Low);


// início da linha de sinal - da última barra do dia anterior.


buff_Signal [i_Current_TF_Bar] = buff_Signal [i_Current_TF_Bar - 1] = d_Range_Low - gd_Extremum_Break;


buff_Signal_Color [i_Current_TF_Bar] = buff_Signal_Color [i_Current_TF_Bar - 1] = 0;


se (Show_Outer) enquanto (--i_Period_Bar & gt; 0)


se (Tempo [i_Period_Bar] & lt; t_D1_Bar_To_Fill) quebrar;


enquanto (--i_Period_Bar & gt; 0)


se (Tempo [i_Period_Bar] & lt; t_D1_Bar_To_Fill) quebrar;


buff_1st_Bar_Inner_Zero [i_Period_Bar] = d_Range_High - 0.2 * (d_Range_High - d_Range_Low);


buff_1st_Bar_Inner [i_Period_Bar] = d_Range_Low + 0.2 * (d_Range_High - d_Range_Low);


// início da linha de sinal - da última barra do dia anterior.


buff_Signal [i_Current_TF_Bar] = buff_Signal [i_Current_TF_Bar - 1] = d_Range_High + gd_Extremum_Break;


buff_Signal_Color [i_Current_TF_Bar] = buff_Signal_Color [i_Current_TF_Bar - 1] = 1;


Todas as linhas de layout restantes devem ser plotadas dentro do loop de iteração de barras do tempo atual. Como já mencionado, a linha de sinal deve terminar na barra onde o preço o tocou. A linha de pedido pendente deve começar na mesma barra e terminar na barra, na qual ocorre o contato com o preço. As linhas Take Profit e Stop Loss devem começar na mesma barra. O layout do padrão é concluído no bar, no qual o preço toca em um deles:


enquanto (++ i_Period_Bar & lt; rates_total)


se (Tempo [i_Period_Bar] & gt; t_Curr_D1_Bar + 86399) quebrar;


buff_Signal [i_Period_Bar] = d_Range_Low - gd_Extremum_Break;


se (d_Range_Low - gd_Extremum_Break & gt; = Low [i_Period_Bar]) quebrar;


enquanto (++ i_Period_Bar & lt; rates_total)


se (Tempo [i_Period_Bar] & gt; t_Curr_D1_Bar + 86399) quebrar;


buff_Signal [i_Period_Bar] = d_Range_High + gd_Extremum_Break;


se (d_Range_High + gd_Extremum_Break & lt; = High [i_Period_Bar]) quebrar;


enquanto (++ i_Period_Bar & lt; rates_total)


se (Tempo [i_Period_Bar] & gt; t_Curr_D1_Bar + 86399) quebrar;


se (d_Range_Low & lt; = High [i_Period_Bar])


se (buff_Entry [i_Period_Bar - 1] == 0.)


// iniciar e terminar em uma única barra, estender por 1 barra para o passado.


buff_Entry [i_Period_Bar - 1] = d_Range_Low;


buff_Entry_Color [i_Period_Bar - 1] = 0;


enquanto (++ i_Period_Bar & lt; rates_total)


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


if (d_Range_High >= Low [i_Period_Bar])


if (buff_Entry[i_Period_Bar — 1 ] == 0 .)


// start and end on a single bar, extend by 1 bar to the past.


buff_Entry[i_Period_Bar — 1 ] = d_Range_High;


buff_Entry_Color[i_Period_Bar — 1 ] = 1 ;


// SL is equal to the Low since the beginning of a day:


d_SL = Low [ ArrayMinimum ( Low , si_1st_Bar_of_Day, i_Period_Bar — si_1st_Bar_of_Day)];


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


if (d_TP <= High [i_Period_Bar] || d_SL >= Low [i_Period_Bar])


if (buff_SL[i_Period_Bar — 1 ] == 0 .)


// start and end on a single bar, extend by 1 bar to the past.


buff_SL[i_Period_Bar — 1 ] = d_SL;


buff_TP[i_Period_Bar — 1 ] = d_TP;


// SL is equal to the High since the beginning of a day:


d_SL = High [ ArrayMaximum ( High , si_1st_Bar_of_Day, i_Period_Bar — si_1st_Bar_of_Day)];


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


if (d_SL <= High [i_Period_Bar] || d_TP >= Low [i_Period_Bar])


if (buff_SL[i_Period_Bar — 1 ] == 0 .)


// start and end on a single bar, extend by 1 bar to the past.


buff_SL[i_Period_Bar — 1 ] = d_SL;


buff_TP[i_Period_Bar — 1 ] = d_TP;


Let's place the call code of the f_Do_Alert signal notification function out of the loop. In fact, it has slightly wider opportunities as compared to the ones involved in this indicator — the function is able to work with audio files meaning that this option can be added to custom settings. The same is true for the ability to select separate files for buy and sell signals. Function listing:


string s_Message, // alert message.


bool b_Alert = true , // show a pop-up window?


bool b_Sound = false , // play a sound file?


bool b_Email = false , // send an eMail?


bool b_Notification = false , // send a push notification?


string s_Email_Subject = "" , // eMail subject.


string s_Sound = "alert. wav" // sound file.


static string ss_Prev_Message = "there was silence" ; // previous alert message.


static datetime st_Prev_Time; // previous alert bar time.


datetime t_This_Bar_Time = TimeCurrent () — PeriodSeconds () % PeriodSeconds (); // current bar time.


// another and/or 1 st at this bar.


s_Message = StringFormat ( "%s | %s | %s | %s" ,


TimeToString ( TimeLocal (), TIME_SECONDS ), // local time.


StringSubstr ( EnumToString ( ENUM_TIMEFRAMES ( _Period )), 7 ), // TF.


if (b_Alert) Alert (s_Message);


if (b_Email) SendMail (s_Email_Subject + " " + _Symbol , s_Message);


if (b_Notification) SendNotification (s_Message);


if (b_Sound) PlaySound (s_Sound);


The code for checking the need for calling the function and forming the text for it located in the program body before completion of the OnCalculate event handler:


i_Period_Bar = rates_total — 1 ; // current bar.


if (buff_Signal[i_Period_Bar] == 0 ) return (rates_total); // nothing to catch yet (or already)


buff_Signal[i_Period_Bar] > High [i_Period_Bar]


buff_Signal[i_Period_Bar] < Low [i_Period_Bar]


) return (rates_total); // no signal line touching.


string s_Message = StringFormat ( "TS 80-20: needed %s @ %s, TP: %s, SL: %s" ,


buff_Signal_Color[i_Period_Bar] > 0? "BuyStop" : "SellStop" ,


DoubleToString (d_Entry_Level, _Digits ),


DoubleToString (d_TP, _Digits ),


DoubleToString (d_SL, _Digits )


f_Do_Alert(s_Message, Alert_Popup, false , Alert_Email, Alert_Push, Alert_Email_Subj);


The entire source code of the indicator can be found in the attached files (TS_80-20.mq5). The trading layout according to the system is best seen on minute charts.


Please note that the indicator uses the bar data rather than tick sequences inside bars. This means if the price crossed several layout lines (for example, Take Profit and Stop Loss lines) on a single bar, you cannot always define which of them was crossed first. Another uncertainty stems from the fact that the start and end lines cannot coincide. Otherwise, the lines from the buffer of DRAW_LINE and DRAW_COLOR_LINE types will simply be invisible to a user. These features reduce the layout accuracy but it still remains quite clear.


Expert Advisor for testing the '80-20' trading strategy.


The basic EA for testing strategies from the book Street Smarts: High Probability Short-Term Trading Strategies was described in details in the first article. Let's insert two significant changes in it. First, the signal module is to be used in the indicator as well meaning it would be reasonable to set trading levels calculation in it. We have already done this above. Apart from the signal status, the fe_Get_Entry_Signal function returns order placement, Stop Loss and Take Profit levels. Therefore, let's remove the appropriate part of the code from the previous EA version adding the variables for accepting levels from the function and edit the function call itself. The listings of the old and new code blocks can be found in the attached file (strings 128-141).


Another significant addition to the basic EA code is due to the fact that, unlike the previous two, this TS deals with a short-term trend. It assumes that the roll-back happens once a day and is unlikely to be repeated. This means that the robot has to make only one entry ignoring the existing signal all the rest of the time until the next day. The easiest way to implement that is to use a special flag — static or global variable of bool type in the program memory. But if the EA operation is interrupted for some reason (the terminal is closed, the EA is removed from the chart, etc.), the flag value is lost as well. Thus, we should have the ability to check if today's signal was activated previously. To do this, we may analyze the history of trades for today or store the date of the last entry in the terminal global variables rather than in the program. Let us use the second option since it is much easier to implement.


Provide users with the ability to manage 'one entry per day' option and set an ID of each launched version of the robot — it is needed to use global variables of the terminal level:


input uint Magic_Number = 2018 ; // EA magic number.


Let's add the variables necessary to implement 'one entry per day' option to the program's global variables definition block. Initialize them in the OnInit function:


gs_Prefix // identifier of (super)global variables.


gs_Prefix = StringFormat ( "SSB %s %u %s" , _Symbol , Magic_Number, MQLInfoInteger ( MQL_TESTER ) ? "t " : "" );


gb_Position_Today = int ( GlobalVariableGet (gs_Prefix + "Last_Position_Date" )) == TimeCurrent () — TimeCurrent () % 86400 ;


gb_Pending_Today = int ( GlobalVariableGet (gs_Prefix + "Last_Pending_Date" )) == TimeCurrent () — TimeCurrent () % 86400 ;


Here the robot reads the values of global variables and compares the written time with the day start time, thus defining if the today's signal has already been processed. Time is written to the variables in two places — let's add the appropriate block to the pending order installation code (additions highlighted):


if (Log_Level > LOG_LEVEL_NONE) Print ( "Pending order placing error" );


// the distance from the current price is not enough :(


if (Log_Level > LOG_LEVEL_ERR)


PrintFormat ( "Pending order cannot be placed at the %s level. Bid: %s Ask: %s StopLevel: %s" ,


DoubleToString (d_Entry_Level, _Digits ),


DoubleToString (go_Tick. bid, _Digits ),


DoubleToString (go_Tick. ask, _Digits ),


DoubleToString (gd_Stop_Level, _Digits )


// to update the flag:


GlobalVariableSet ( // in the terminal global variables.


TimeCurrent () — TimeCurrent () % 86400.


gb_Pending_Today = true ; // in the program global variables.


The second block is placed after the code defining a newly opened position:


if ( PositionGetDouble ( POSITION_SL ) == 0 .)


// update the flag:


GlobalVariableSet ( // in the terminal global variables.


TimeCurrent () — TimeCurrent () % 86400.


gb_Position_Today = true ; // in the program global variables.


These are the only significant changes in the previous EA version code. The finalized source code of the new version is attached below.


Strategy backtesting.


In order to illustrate the trading system viability, its authors use patterns detected on the charts from the end of the last century. Therefore, we need to check its relevance in today's market conditions. For testing, I took the most popular Forex pair EURUSD, the most volatile pair USDJPY and one of the metals — XAUUSD. I increased the indents specified by Raschke and Connors 10 times, since four-digit quotes were used when the book was written, while I tested the EA on five-digit ones. Since there is no any guidance concerning the trailing parameters, I have selected the ones that seem to be most appropriate to daily timeframe and instrument volatility. The same applies to the Take Profit calculation algorithm added to the original rules — the ratio for its calculation was chosen arbitrarily, without deep optimization.


The balance chart when testing on the five-year EURUSD history with the original rules (no Take Profit):


The same settings and Take Profit:


The balance chart when testing the original rules on the five-year USDJPY history:


The same settings and Take Profit:


The balance chart when testing the original rules on the daily gold quotes for the last 4 years:


The full data on the robot settings used in each test can be found in the attached archive containing the complete reports.


Conclusão.


The rules programmed in the signal module match the 80-20 trading system description provided by Linda Raschke and Laurence Connors in their book "Street Smarts: High Probability Short-Term Trading Strategies". However, we have extended the original rules a bit. The tools (the robot and the indicator) are to help traders draw their own conclusions concerning the TS relevance in today's market. In my humble opinion, the TS needs a serious upgrade. In this article, I have tried to make some detailed comments on developing the code of the signal module, as well as the appropriate robot and indicator. I hope, this will help those who decide to do the upgrade. Apart from modifying the rules, it is also possible to find trading instruments that fit better to the system, as well as signal detection and tracking parameters.


Traduzido do russo pela MetaQuotes Software Corp.


Opções binárias.


80 trading strategies for novice.


Forex Trading Strategies - FX Leaders.


Essas estratégias de negociação intra-dia simples melhoram instantaneamente a lucratividade: Média em Movimento, Reversão de Função, resistência de suporte, Heiken-Ashi, Castiçal e amp; Mais.


Estratégias de negociação Forex para iniciantes | Ação Preço diário.


Read our beginner's guide on binary options trading to become familiar with the You get your $100 back and a return of 80% Binary Option Trading Strategies 101;


Forex Trading Strategies For Beginners, Finance Articles.


Day Trading Strategies For Beginners although the entries in day trading strategies typically rely on the same around 80% of day traders lose money.


Basic Trading Strategies For Novice Traders | Fórum de Forex.


Get a “Trading strategies” pdf for free! The file contains comprehending information on 10 very simple strategies. It will be useful for both: novice and.


Beginner Binary Options Winning Strategy that Works | OA.


Think of it as your ultimate reference guide to stock trading and the next step in The trading stock strategy guide is a collection Stock Trading for Beginners.


Day Trading: Estratégias para iniciantes - Day Trade The World ™


Scalping is not the best trading strategy for rookies as it involves and again pick it at 30.80, beginners should avoid using this strategy and stick to.


Trading for Beginners - The 80/20 to getting started.


O mercado Forex é preenchido com centenas de diferentes estratégias de negociação, mas quais são as melhores estratégias de negociação Forex para iniciantes? This is a common question.


Dicas EUR / USD e Estratégias de Negociação - Idéias de Negociação Forex.


If you are beginner in FX and want to learn about forex trading strategies and how to Forex Trading Strategies for Beginners. that 80% of new.


Day Trading Strategies For Beginners - investopedia.


Tennis Trading – The 80/20 rule. I spent years refining and developing my trading strategies. Tennis Trading for Beginners. Tennis Trading Advice:


FREE 'Beginners' Forex Trading Introduction Course | Forex.


Binary options signals pro review Binary option now Binary option hack Binary options free demo account no deposit Binary option demo accounts No deposit binary.


Best Day Trading Strategies - Learn To Trade Momentum.


Esta estratégia é útil tanto para principiantes quanto para comerciantes mais experientes. Beginners can run the strategy automatically until they understand it better and then apply.


Momentum Day Trading Strategies for Beginners: A Step by.


Estratégias simples de negociação Forex para iniciantes. Depois de entrar em um comércio, mantenha-o por 80 dias e depois saia. Remember, this is a long-term strategy.


Top 5 binary options strategies for beginners | Binário.


Make profits by following the forex trading strategies of our Many novice traders find scalping It is common knowledge that new Forex trader's fail 80% of.


6 ótimas estratégias de opções para iniciantes - StockTrader.


Obrigado por baixar "6 Estratégias Simples para Negociar Forex". This book is designed for beginning, “80 percent of trading is in your head”.


80 trading strategies for novice :: Binary options trading.


Top 5 estratégias de negociação populares. the price will temporarily reverse as traders take their profits and novice participants attempt to trade in the opposite direction.


DEFINIÇÕES DA SÉRIE DE EDUCAÇÃO DO PROFILE DE MERCADO.


EUR/USD Tips and Trading Strategies • 80%+ of all Currency Transactions Involve the US Dollar. USD Trading Tips.


Forex para iniciantes: - BizMove Home - Business.


This page contains information about a strategy that one can use to win more than 80% trades in binary options trading trading strategies novice statistically.


3 melhores estratégias de negociação de opções binárias - ganhando 60 seg.


FX Trading Strategies, a website dedicated to free technical and fundamental analysis strategies for successful trading. Forex trading strategies for beginners.


10 dias de dicas comerciais para iniciantes | Online Trading Academy.


6 ótimas estratégias de opções para iniciantes. Buy 7 XOM Nov 80 calls fact that the majority of rookies begin their option trading careers by adopting that strategy.


80 Forex Strategies - forexpm.


Estratégia de vencimento das opções binárias do novato. binary options strategy for beginners and what in binary options trading. Find out why these strategies are.


Swing Trading For Beginners - Learn Swing Trading Strategy.


Based on the truism that 80% of the time markets tend to follow the trend and only 20% of the time they In this post we will examine range trading strategies.


9 Estratégias de negociação intra-dia para Forex, Stocks ou.


26/06/2017 · Introduction '80-20' is a name of one of the trading the development of the '80-20' trading strategy signal at slightly advanced novice.


6 ESTRATÉGIAS SEMPREIS PARA FOREX DE NEGOCIAÇÃO.


What would be the best trading strategy for novice forex investor who’s mostly interested in algorithmic trading strategies?


Melhores estratégias de 60 segundos e gt; Estratégia de Opções Binárias 2017.


12/02/2018 · KoolPay continue its ‘teaching’ set of basic forex strategies. If you are a novice trader we highly recommend you to take a couple of minutes and look.


The Beginner's Guide to Online Stock Trading.


Day Trading: estratégias para iniciantes. Day trading is a worthwhile activity, but you must know what you are doing. There is a technique that will help you succeed at.


What would be the best trading strategy for novice forex.


Binary Trading Strategies & Dicas. 80%: VISIT SITE: $50: 160% Since binary options trading is a relatively new form of trading the quality binary trading.


3 Simple Horse Racing Trading Strategies That Work.


Sistema de negociação Forex automatizado - Estratégia precisa do sistema Scalping Forex com 80% com MACD e indicador estocástico.


Forex Trading Strategy • Price Action Strategy - forex4noobs.


15/07/2018 · Unsubscribe from Binary Options Trading For Beginners? Learn How To Trade Binary Options - 80% 60 second trading strategy, binary options 60.


Como a regra 80/20 se aplica ao Forex Trading »Aprenda a negociar.


Day Trading Strategies for Beginners. Day trading is an excellent option for anyone who is seeking quick returns when they are trading the forex market.


Learn How To Trade Binary Options - 80% Accurate 60 Second.


Nick's Forex Trading Strategy uses Forex Price Action and clean charts to make pips consistently each week so you can trade for My targets are on average 80 pips.


80-20 trading strategy - AMP Forum.


How to Day Trade: 10 Day Trading Strategies for Beginners What is day trading? Day Trading refers to market positions which are held only a short time; typically the.


Top 5 estratégias de negociação populares - TradingMarkets.


Swing trading for beginners No one ever told me that these stocks have a correlation to the market of about 70 percent and about 80 Day Trading Strategies.


Top 10 melhores estratégias de negociação Forex por profissionais.


See the top 5 binary options strategies for beginners. Find out more about trading systems that any rookie could use effectively to generate profits.


Day Trading Strategies for Beginners | Comerciantes de mercado.


Momentum Day Trading Strategies são extremamente populares entre os comerciantes de dias iniciantes porque são tão simples. Saiba como encontrar os próximos estoques de impulso quente!


&cópia de; 80 trading strategies for novice Binary Option | 80 trading strategies for novice Best binary options.


80-20 trading strategy.


Introdução.


'80-20' is a name of one of the trading strategies (TS) described in the book Street Smarts: High Probability Short-Term Trading Strategies by Linda Raschke and Laurence Connors. Similar to the strategies discussed in my previous article, the authors attribute it to the stage when the price tests the range borders. It is also focused on profiting from false breakouts and roll-backs from the borders. But this time, we analyze the price movement on a significantly shorter history interval involving the previous day only. The lifetime of an obtained signal is also relatively short, since the system is meant for intraday trading.


The first objective of the article is to describe the development of the '80-20' trading strategy signal module using MQL5 language. Then, we are going to connect this module to the slightly edited version of the basic trading robot developed in the previous article of the series. Besides, we are going to use the very same module for the development of an indicator for manual trading.


As already said, the code provided in the article series is aimed mainly at slightly advanced novice programmers. Therefore, besides its main objective, the code is designed to help move from the procedural programming to the object-oriented one. The code will not feature classes. Instead, it will fully implement structures that are easier to master.


Yet another objective of the article is to develop tools allowing us to check if the strategy is still viable today, since Raschke and Connors used the market behavior at the end of the last century when creating it. A few EA tests based on the up-to-date history data are presented at the end of the article.


'80-20' trading system.


The authors name George Taylor's The Taylor Trading Technique, as well as Steve Moore's works on the computer analysis of futures markets and Derek Gipson's trading experience as theoretical basis for their own work. The essence of the trading strategy can be briefly described as follows: if the previous day's Open and Close prices are located at the opposite daily range areas, then the probability of a reversal towards the previous day's opening is very high today. The previous day's Open and Close prices should locate close to the range borders. The reversal should start the current day (not before the previous day's candle is closed). The strategy rules for buying are as follows:


1. Make sure that the market opened in the upper 20% and closed in the lower 20% of the daily range yesterday.


2. Wait till today's Low breaks the previous day's one at least by 5 ticks.


3. Place a buy pending order on the lower border of the yesterday's range.


4. Once the pending order triggers, set its initial StopLoss at the day's Low.


5. Use trailing stop to protect the obtained profit.


Sell entry rules are similar, but the yesterday's bar should be bullish, a buy order should be located at the upper border of the bar, while StopLoss should be placed at the today's High.


Yet another important detail is a size of a closed daily bar. According to Linda Raschke, it should be large enough - more than the average size of daily bars. However, she does not specify how many history days should be taken into consideration when calculating the average daily range.


We should also keep in mind that the TS is designed exclusively for intraday trading — examples shown in the book use M15 charts.


The signal block and the indicator making a layout according to the strategy are described below. You can also see a few screenshots with the indicator operation results. They clearly illustrate patterns corresponding to the system rules and trading levels linked to the patterns.


The pattern analysis should result in placing a buy pending order. Appropriate trading levels are better seen on M1 timeframe:


A similar pattern with the opposite trading direction on M5 timeframe:


Its trading levels (M1 timeframe):


Signal module.


Let's add Take Profit level calculation to illustrate adding new options to a custom TS. There is no such a level in the original version as only a trailing stop is used to close a position. Let's make Take Profit dependent on the custom minimum breakout level ( TS_8020_Extremum_Break ) — we will multiply it by the TS_8020_Take_Profit_Ratio custom ratio.


We will need the following elements of the fe_Get_Entry_Signal signal module's main function: current signal status, calculated entry and exit levels (Stop Loss and Take Profit), as well as yesterday's range borders. All levels are received via links to the variables passed to the function, while the signal's return status uses the list of options from the previous article:


ENTRY_BUY, // buy signal.


ENTRY_SELL, // sell signal.


ENTRY_NONE, // no signal.


ENTRY_UNKNOWN // status not defined.


datetime t_Time, // current time.


double & d_Entry_Level, // entry level (link to the variable)


double & d_SL, // StopLoss level (link to the variable)


double & d_TP, // TakeProfit level (link to the variable)


double & d_Range_High, // High of the pattern's 1 st bar (link to the variable)


double & d_Range_Low // Low of the pattern's 1 st bar (link to the variable)


In order to detect a signal, we need to analyze the last two bars of D1 timeframe. Let's start from the first one — if it does not meet the TS criteria, there is no need to check the second bar. There are two criteria:


1. The bar size (difference between High and Low) should exceed the average value for the last XX days (set by the TS_8020_D1_Average_Period custom setting)


2. Bar Open and Close levels should be located at the opposite 20% of the bar range.


If these conditions are met, High and Low prices should be saved for further use. Since the first bar parameters do not change within the entire day, there is no point in checking them at each function call. Let's store them in static variables:


input uint TS_8020_D1_Average_Period = 20 ; // 80-20: Number of days for calculating the average daily range.


input uint TS_8020_Extremum_Break = 50 ; // 80-20: Minimum breakout of the yesterday's extremum (in points)


static ENUM_ENTRY_SIGNAL se_Possible_Signal = ENTRY_UNKNOWN; // pattern's first bar signal direction.


// variables for storing calculated levels between ticks.


sd_SL = 0 , sd_TP = 0 ,


sd_Range_High = 0 , sd_Range_Low = 0.


// check the pattern's first bar on D1:


if (se_Possible_Signal == ENTRY_UNKNOWN)


st_Last_D1_Bar = t_Curr_D1_Bar; // 1 st bar does not change this day.


double d_Average_Bar_Range = fd_Average_Bar_Range(TS_8020_D1_Average_Period, PERIOD_D1 , t_Time);


// 1 st bar is not large enough.


se_Possible_Signal = ENTRY_NONE; // means no signal today.


ma_Rates[ 0 ].open > ma_Rates[ 0 ].high — d_20_Percents // bar opened in the upper 20%


ma_Rates[ 0 ].close < ma_Rates[ 0 ].low + d_20_Percents // and closed in the lower 20%


ma_Rates[ 0 ].close > ma_Rates[ 0 ].high — d_20_Percents // bar closed in the upper 20%


ma_Rates[ 0 ].open < ma_Rates[ 0 ].low + d_20_Percents // and opened in the lower 20%


// 1 st bar corresponds to the conditions.


// define today's trading direction for the pattern's 1 st bar:


se_Possible_Signal = ma_Rates[ 0 ].open > ma_Rates[ 0 ].close ? ENTRY_BUY : ENTRY_SELL;


// market entry level:


sd_Entry_Level = d_Entry_Level = se_Possible_Signal == ENTRY_BUY ? ma_Rates[ 0 ].low : ma_Rates[ 0 ].high;


// pattern's 1 st bar range borders:


sd_Range_High = d_Range_High = ma_Rates[ 0 ].high;


sd_Range_Low = d_Range_Low = ma_Rates[ 0 ].low;


// 1 st bar open/close levels do not match conditions.


se_Possible_Signal = ENTRY_NONE; // means no signal today.


Listing of the function for defining the average bar range within the specified number of bars on the specified timeframe beginning from the specified time function:


int i_Bars_Limit, // how many bars to consider.


ENUM_TIMEFRAMES e_TF = PERIOD_CURRENT , // bars timeframe.


datetime t_Time = WRONG_VALUE // when to start calculation.


double d_Average_Range = 0 ; // variable for summing values.


if (i_Bars_Limit < 1 ) return (d_Average_Range);


if (t_Time == WRONG_VALUE ) t_Time = TimeCurrent ();


int i_Price_Bars = CopyRates ( _Symbol , e_TF, t_Time, i_Bars_Limit, ma_Rates);


if (Log_Level > LOG_LEVEL_NONE) PrintFormat ( "%s: CopyRates: error #%u" , __FUNCTION__ , _LastError );


if (Log_Level > LOG_LEVEL_NONE) PrintFormat ( "%s: CopyRates: copied %u bars of %u" , __FUNCTION__ , i_Price_Bars, i_Bars_Limit);


int i_Bar = i_Price_Bars;


d_Average_Range += ma_Rates[i_Bar].high — ma_Rates[i_Bar].low;


return (d_Average_Range / double (i_Price_Bars));


There is only one criterion for the pattern's second (current) bar — breakout of the yesterday's range border should not be less than the one specified in the settings ( TS_8020_Extremum_Break ). As soon as the level is reached, a signal for placing a pending order appears:


if (se_Possible_Signal == ENTRY_BUY)


sd_SL = d_SL = ma_Rates[ 1 ].low; // StopLoss — to the today's High.


if (TS_8020_Take_Profit_Ratio > 0 ) sd_TP = d_TP = d_Entry_Level + _Point * TS_8020_Extremum_Break * TS_8020_Take_Profit_Ratio; // TakeProfit.


// is the downward breakout clearly seen?


ma_Rates[ 1 ].close < ma_Rates[ 0 ].low — _Point * TS_8020_Extremum_Break ?


sd_SL = d_SL = ma_Rates[ 1 ].high; // StopLoss — to the today's Low.


if (TS_8020_Take_Profit_Ratio > 0 ) sd_TP = d_TP = d_Entry_Level — _Point * TS_8020_Extremum_Break * TS_8020_Take_Profit_Ratio; // TakeProfit.


// is the upward breakout clearly seen?


ma_Rates[ 1 ].close > ma_Rates[ 0 ].high + _Point * TS_8020_Extremum_Break ?


Save the two functions mentioned above ( fe_Get_Entry_Signal and fd_Average_Bar_Range ) and the custom settings related to receiving a signal to the mqh library file. The full listing is attached below. Let's name the file Signal_80-20.mqh and place it to the appropriate directory of the terminal data folder (MQL5\Include\Expert\Signal).


Indicator for manual trading.


Just like the EA, the indicator is to use the signal module described above. The indicator should inform a trader on receiving a pending order placement signal and provide the calculated levels — order placement, Take Profit and Stop Loss levels. A user can select a notification method — a standard pop-up window, email alert or push notification. It is possible to choose all at once or any combination you like.


Another indicator objective is a trading history layout according to '80-20' TS. The indicator is to highlight daily bars corresponding to the system criteria and plot calculated trading levels. The level lines display how the situation evolved over time. For more clarity, let's do as follows: when the price touches the signal line, the latter is replaced with a pending order line. When the pending order is activated, its line is replaced with Take Profit and Stop Loss lines. These lines are interrupted when the price touches one of them (the order is closed). This layout makes it easier to evaluate the efficiency of the trading system rules and define what can be improved.


Let's start with declaring the buffers and their display parameters. First, we need to declare the two buffers with the vertical area filling (DRAW_FILLING). The first one is to highlight the full daily bar range of the previous day, while another one is to highlight the inner area only to separate it from the upper and lower 20% of the range used in TS. After that, declare the two buffers for the multi-colored signal line and the pending order line (DRAW_COLOR_LINE). Their color depends on the trading direction. There are other two lines (Take Proft and Stop Loss) with their color remaining the same (DRAW_LINE) — they are to use the same standard colors assigned to them in the terminal. All selected display types, except for a simple line, require two buffers each, therefore the code looks as follows:


#property indicator_buffers 10.


#property indicator_plots 6.


#property indicator_type1 DRAW_FILLING.


#property indicator_color1 clrDeepPink , clrDodgerBlue.


#property indicator_width1 1.


#property indicator_type2 DRAW_FILLING.


#property indicator_color2 clrDeepPink , clrDodgerBlue.


#property indicator_width2 1.


#property indicator_type3 DRAW_COLOR_LINE.


#property indicator_style3 STYLE_SOLID.


#property indicator_color3 clrDeepPink , clrDodgerBlue.


#property indicator_width3 2.


#property indicator_type4 DRAW_COLOR_LINE.


#property indicator_style4 STYLE_DASHDOT.


#property indicator_color4 clrDeepPink , clrDodgerBlue.


#property indicator_width4 2.


#property indicator_type5 DRAW_LINE.


#property indicator_style5 STYLE_DASHDOTDOT.


#property indicator_color5 clrCrimson.


#property indicator_width5 1.


#property indicator_type6 DRAW_LINE.


#property indicator_style6 STYLE_DASHDOTDOT.


#property indicator_color6 clrLime.


#property indicator_width6 1.


Let's provide traders with the ability to disable the filling of the daily pattern's first bar, select signal notification options and limit the history layout depth. All trading system settings from the signal module are also included here. To do this, we need to preliminarily enumerate the variables used in the module even if some of them are to be used only in the EA and are of no need in the indicator:


input bool Show_Inner = true ; // 1 st bar of the pattern: Show the inner area?


input bool Alert_Popup = true ; // Alert: Show a pop-up window?


input bool Alert_Email = false ; // Alert: Send an eMail?


input string Alert_Email_Subj = "" ; // Alert: eMail subject.


input bool Alert_Push = true ; // Alert: Send a push notification?


buff_1st_Bar_Outer[], buff_1st_Bar_Outer_Zero[], // buffers for plotting the full range of the pattern's 1 st bar.


buff_1st_Bar_Inner[], buff_1st_Bar_Inner_Zero[], // buffers for plotting the internal 60% of the pattern's 1 st bar.


buff_Signal[], buff_Signal_Color[], // signal line buffers.


buff_Entry[], buff_Entry_Color[], // pending order line buffers.


buff_SL[], buff_TP[], // StopLoss and TakeProfit lines' buffers.


gd_Extremum_Break = 0 // TS_8020_Extremum_Break in symbol prices.


gi_D1_Average_Period = 1 , // correct value for TS_8020_D1_Average_Period.


gi_Min_Bars = WRONG_VALUE // minimum required number of bars for re-calculation.


// check the entered TS_8020_D1_Average_Period parameter:


gi_D1_Average_Period = int ( fmin ( 1 , TS_8020_D1_Average_Period));


// converting points to symbol prices:


gd_Extremum_Break = TS_8020_Extremum_Break * _Point ;


// minimum required number of bars for re-calculation = number of bars of the current TF within a day.


gi_Min_Bars = int ( 86400 / PeriodSeconds ());


SetIndexBuffer ( 0 , buff_1st_Bar_Outer, INDICATOR_DATA );


PlotIndexSetDouble ( 0 , PLOT_EMPTY_VALUE , 0 );


SetIndexBuffer ( 1 , buff_1st_Bar_Outer_Zero, INDICATOR_DATA );


SetIndexBuffer ( 2 , buff_1st_Bar_Inner, INDICATOR_DATA );


PlotIndexSetDouble ( 1 , PLOT_EMPTY_VALUE , 0 );


SetIndexBuffer ( 3 , buff_1st_Bar_Inner_Zero, INDICATOR_DATA );


SetIndexBuffer ( 4 , buff_Signal, INDICATOR_DATA );


PlotIndexSetDouble ( 2 , PLOT_EMPTY_VALUE , 0 );


SetIndexBuffer ( 5 , buff_Signal_Color, INDICATOR_COLOR_INDEX );


SetIndexBuffer ( 6 , buff_Entry, INDICATOR_DATA );


PlotIndexSetDouble ( 3 , PLOT_EMPTY_VALUE , 0 );


SetIndexBuffer ( 7 , buff_Entry_Color, INDICATOR_COLOR_INDEX );


SetIndexBuffer ( 8 , buff_SL, INDICATOR_DATA );


PlotIndexSetDouble ( 4 , PLOT_EMPTY_VALUE , 0 );


SetIndexBuffer ( 9 , buff_TP, INDICATOR_DATA );


PlotIndexSetDouble ( 5 , PLOT_EMPTY_VALUE , 0 );


IndicatorSetString ( INDICATOR_SHORTNAME , "80-20 TS" );


Place the main program's code to the built-in OnCalculate function — arrange the loop for iterating over the current timeframe's bars from the past to the future searching them for a signal using the function from the signal module. Declare and initialize the necessary variables using initial values. Let's define the oldest loop bar for the first calculation considering a user-defined history depth limit ( Bars_Limit ). For subsequent calls, all bars of the current day (rather than the last bar) are re-calculated, since the two-bar pattern actually belongs to D1 chart regardless of the current timeframe.


Besides, we should protect against the so-called phantoms: if we do not perform a forced indicator buffers clearing during re-initialization, then no longer relevant filled areas remain on the screen when switching timeframes or symbols. The buffer clearing should be bound to the first OnCalculate function call after the indicator initialization. However, the standard prev_calculated variable is not enough for defining if the call is the first one, since it may contain zero not only during the first function call but also "when changing the checksum". Let's spend some time to properly solve this issue by creating the structure not affected by setting the prev_calculated variable to zero. The structure is to store and process data frequently used in the indicators:


- flag of the OnCalculate function first launch;


- the counter of calculated bars that is not set to zero when changing the checksum;


- flag of changing the checksum;


- flag of the beginning of a new bar;


- current bar start time.


The structure combining all these data is to be declared at the global level. It should be able to gather or present data from/to any built-in or custom functions. Let's name this structure Brownie. It can be placed to the end of the indicator code. A single global type structure object named go_Brownie is to be declared there as well:


datetime t_Last_Bar_Time; // time of the last processed bar.


int i_Prew_Calculated; // number of calculated bars.


bool b_First_Run; // first launch flag.


bool b_History_Updated; // history update flag.


bool b_Is_New_Bar; // new bar opening flag.


b_First_Run = b_Is_New_Bar = true ;


if (b_Reset_First_Run) b_First_Run = true ; // set to zero if there is permission.


// flag of the OnCalculate built-in function first call.


if (b_First_Run && i_Prew_Calculated > 0 ) b_First_Run = false ;


datetime t_This_Bar_Time = TimeCurrent () - TimeCurrent () % PeriodSeconds ();


b_Is_New_Bar = t_Last_Bar_Time == t_This_Bar_Time;


if (b_Is_New_Bar) t_Last_Bar_Time = t_This_Bar_Time;


// are there any changes in history?


b_History_Updated = i_New_Prew_Calculated == 0 && i_Prew_Calculated > WRONG_VALUE ;


if (i_Prew_Calculated == WRONG_VALUE ) i_Prew_Calculated = i_New_Prew_Calculated;


// or if there was no history update.


else if (i_New_Prew_Calculated > 0 ) i_Prew_Calculated = i_New_Prew_Calculated;


Let's inform the Brownie of the indicator de-initialization event:


go_Brownie. f_Reset(); // inform Brownie.


If necessary, the amount of data stored by the Brownie can be expanded if custom functions or classes need prices, volumes or the current bar's spread value (Open, High, Low, Close, tick_volume, volume, spread). It is more convenient to use ready-made data from the OnCalculate function and pass them via Brownie rather than using the time series copying functions (CopyOpen, CopyHigh etc. or CopyRates) — this saves the CPU resources and eliminates the necessity to arrange processing of errors of these language functions.


Let's get back to the main indicator function. Declaring variables and preparing the arrays using the go_Brownie structure look as follows:


i_Period_Bar = 0 , // auxiliary counter.


i_Current_TF_Bar = rates_total - int (Bars_Limit) // bar index of the current TF loop start.


static datetime st_Last_D1_Bar = 0 ; // time of the last processed bar of the couple of D1 bars (pattern's 2 nd bar)


static int si_1st_Bar_of_Day = 0 ; // index of the current day's first bar.


// clear the buffers during re-initialization:


ArrayInitialize (buff_1st_Bar_Inner, 0 ); ArrayInitialize (buff_1st_Bar_Inner_Zero, 0 );


ArrayInitialize (buff_1st_Bar_Outer, 0 ); ArrayInitialize (buff_1st_Bar_Outer_Zero, 0 );


ArrayInitialize (buff_Entry, 0 ); ArrayInitialize (buff_Entry_Color, 0 );


ArrayInitialize (buff_Signal, 0 ); ArrayInitialize (buff_Signal_Color, 0 );


ArrayInitialize (buff_TP, 0 );


ArrayInitialize (buff_SL, 0 );


datetime t_Time = TimeCurrent ();


// minimum re-calculation depth - from the previous day:


i_Current_TF_Bar = rates_total - Bars ( _Symbol , PERIOD_CURRENT , t_Time - t_Time % 86400 , t_Time) - 1 ;


ENUM_ENTRY_SIGNAL e_Signal = ENTRY_UNKNOWN; // signal.


d_SL = WRONG_VALUE , // SL level.


d_TP = WRONG_VALUE , // TP level.


d_Entry_Level = WRONG_VALUE , // entry level.


d_Range_High = WRONG_VALUE , d_Range_Low = WRONG_VALUE // borders of the pattern's 1 st bar range.


t_Curr_D1_Bar = 0 , // current D1 bar time (pattern's 2 nd bar)


t_D1_Bar_To_Fill = 0 // D1 bar time to be filled (pattern's 1 st bar)


i_Current_TF_Bar = int ( fmax ( 0 , fmin (i_Current_TF_Bar, rates_total - gi_Min_Bars)));


// the main program loop is to be located here.


Check the presence of a signal when iterating over the current timeframe bars:


if (e_Signal > 1 ) continue ; // no signal during the day the bar belongs to.


If there is a signal on a new day's first bar, the range of the previous daily bar should be filled. The value of the t_D1_Bar_To_Fill variable of datetime type is used as a flag. If it is equal to WRONG_VALUE, no filling is required on this bar. The signal line should start at the same first bar, but let's extend it to the last bar of the previous day for better layout perception. Since the calculations of a signal line, as well as line and filling colors for bullish and bearish bars are different, let's make two similar blocks:


t_D1_Bar_To_Fill = Time [i_Current_TF_Bar — 1 ] — Time [i_Current_TF_Bar — 1 ] % 86400 ;


else t_D1_Bar_To_Fill = WRONG_VALUE ; // previous day bar, no new filling required.


st_Last_D1_Bar = t_Curr_D1_Bar; // remember.


// Filling the previous day's D1 bar:


if (Show_Outer) while (--i_Period_Bar > 0 )


if ( Time [i_Period_Bar] < t_D1_Bar_To_Fill) break ;


while (--i_Period_Bar > 0 )


if ( Time [i_Period_Bar] < t_D1_Bar_To_Fill) break ;


buff_1st_Bar_Inner_Zero[i_Period_Bar] = d_Range_Low + 0.2 * (d_Range_High — d_Range_Low);


buff_1st_Bar_Inner[i_Period_Bar] = d_Range_High — 0.2 * (d_Range_High — d_Range_Low);


// start of the signal line — from the previous day's last bar.


buff_Signal[i_Current_TF_Bar] = buff_Signal[i_Current_TF_Bar — 1 ] = d_Range_Low — gd_Extremum_Break;


buff_Signal_Color[i_Current_TF_Bar] = buff_Signal_Color[i_Current_TF_Bar — 1 ] = 0 ;


if (Show_Outer) while (--i_Period_Bar > 0 )


if ( Time [i_Period_Bar] < t_D1_Bar_To_Fill) break ;


while (--i_Period_Bar > 0 )


if ( Time [i_Period_Bar] < t_D1_Bar_To_Fill) break ;


buff_1st_Bar_Inner_Zero[i_Period_Bar] = d_Range_High — 0.2 * (d_Range_High — d_Range_Low);


buff_1st_Bar_Inner[i_Period_Bar] = d_Range_Low + 0.2 * (d_Range_High — d_Range_Low);


// start of the signal line — from the previous day's last bar.


buff_Signal[i_Current_TF_Bar] = buff_Signal[i_Current_TF_Bar — 1 ] = d_Range_High + gd_Extremum_Break;


buff_Signal_Color[i_Current_TF_Bar] = buff_Signal_Color[i_Current_TF_Bar — 1 ] = 1 ;


All the remaining layout lines are to be plotted inside the current timeframe's bars iteration loop. As already mentioned, the signal line should end at the bar where the price touched it. The pending order line should start at the same bar and end on the bar, at which the contact with the price occurs. Take Profit and Stop Loss lines should start at the same bar. The layout of the pattern is finished at the bar, at which the price touches one of them:


while (++i_Period_Bar < rates_total)


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


buff_Signal[i_Period_Bar] = d_Range_Low — gd_Extremum_Break;


if (d_Range_Low — gd_Extremum_Break >= Low [i_Period_Bar]) break ;


while (++i_Period_Bar < rates_total)


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


buff_Signal[i_Period_Bar] = d_Range_High + gd_Extremum_Break;


if (d_Range_High + gd_Extremum_Break <= High [i_Period_Bar]) break ;


while (++i_Period_Bar < rates_total)


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


if (d_Range_Low <= High [i_Period_Bar])


if (buff_Entry[i_Period_Bar — 1 ] == 0 .)


// start and end on a single bar, extend by 1 bar to the past.


buff_Entry[i_Period_Bar — 1 ] = d_Range_Low;


buff_Entry_Color[i_Period_Bar — 1 ] = 0 ;


while (++i_Period_Bar < rates_total)


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


if (d_Range_High >= Low [i_Period_Bar])


if (buff_Entry[i_Period_Bar — 1 ] == 0 .)


// start and end on a single bar, extend by 1 bar to the past.


buff_Entry[i_Period_Bar — 1 ] = d_Range_High;


buff_Entry_Color[i_Period_Bar — 1 ] = 1 ;


// SL is equal to the Low since the beginning of a day:


d_SL = Low [ ArrayMinimum ( Low , si_1st_Bar_of_Day, i_Period_Bar — si_1st_Bar_of_Day)];


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


if (d_TP <= High [i_Period_Bar] || d_SL >= Low [i_Period_Bar])


if (buff_SL[i_Period_Bar — 1 ] == 0 .)


// start and end on a single bar, extend by 1 bar to the past.


buff_SL[i_Period_Bar — 1 ] = d_SL;


buff_TP[i_Period_Bar — 1 ] = d_TP;


// SL is equal to the High since the beginning of a day:


d_SL = High [ ArrayMaximum ( High , si_1st_Bar_of_Day, i_Period_Bar — si_1st_Bar_of_Day)];


if ( Time [i_Period_Bar] > t_Curr_D1_Bar + 86399 ) break ;


if (d_SL <= High [i_Period_Bar] || d_TP >= Low [i_Period_Bar])


if (buff_SL[i_Period_Bar — 1 ] == 0 .)


// start and end on a single bar, extend by 1 bar to the past.


buff_SL[i_Period_Bar — 1 ] = d_SL;


buff_TP[i_Period_Bar — 1 ] = d_TP;


Let's place the call code of the f_Do_Alert signal notification function out of the loop. In fact, it has slightly wider opportunities as compared to the ones involved in this indicator — the function is able to work with audio files meaning that this option can be added to custom settings. The same is true for the ability to select separate files for buy and sell signals. Function listing:


string s_Message, // alert message.


bool b_Alert = true , // show a pop-up window?


bool b_Sound = false , // play a sound file?


bool b_Email = false , // send an eMail?


bool b_Notification = false , // send a push notification?


string s_Email_Subject = "" , // eMail subject.


string s_Sound = "alert. wav" // sound file.


static string ss_Prev_Message = "there was silence" ; // previous alert message.


static datetime st_Prev_Time; // previous alert bar time.


datetime t_This_Bar_Time = TimeCurrent () — PeriodSeconds () % PeriodSeconds (); // current bar time.


// another and/or 1 st at this bar.


s_Message = StringFormat ( "%s | %s | %s | %s" ,


TimeToString ( TimeLocal (), TIME_SECONDS ), // local time.


StringSubstr ( EnumToString ( ENUM_TIMEFRAMES ( _Period )), 7 ), // TF.


if (b_Alert) Alert (s_Message);


if (b_Email) SendMail (s_Email_Subject + " " + _Symbol , s_Message);


if (b_Notification) SendNotification (s_Message);


if (b_Sound) PlaySound (s_Sound);


The code for checking the need for calling the function and forming the text for it located in the program body before completion of the OnCalculate event handler:


i_Period_Bar = rates_total — 1 ; // current bar.


if (buff_Signal[i_Period_Bar] == 0 ) return (rates_total); // nothing to catch yet (or already)


buff_Signal[i_Period_Bar] > High [i_Period_Bar]


buff_Signal[i_Period_Bar] < Low [i_Period_Bar]


) return (rates_total); // no signal line touching.


string s_Message = StringFormat ( "TS 80-20: needed %s @ %s, TP: %s, SL: %s" ,


buff_Signal_Color[i_Period_Bar] > 0? "BuyStop" : "SellStop" ,


DoubleToString (d_Entry_Level, _Digits ),


DoubleToString (d_TP, _Digits ),


DoubleToString (d_SL, _Digits )


f_Do_Alert(s_Message, Alert_Popup, false , Alert_Email, Alert_Push, Alert_Email_Subj);


The entire source code of the indicator can be found in the attached files (TS_80-20.mq5). The trading layout according to the system is best seen on minute charts.


Please note that the indicator uses the bar data rather than tick sequences inside bars. This means if the price crossed several layout lines (for example, Take Profit and Stop Loss lines) on a single bar, you cannot always define which of them was crossed first. Another uncertainty stems from the fact that the start and end lines cannot coincide. Otherwise, the lines from the buffer of DRAW_LINE and DRAW_COLOR_LINE types will simply be invisible to a user. These features reduce the layout accuracy but it still remains quite clear.


Expert Advisor for testing the '80-20' trading strategy.


The basic EA for testing strategies from the book Street Smarts: High Probability Short-Term Trading Strategies was described in details in the first article. Let's insert two significant changes in it. First, the signal module is to be used in the indicator as well meaning it would be reasonable to set trading levels calculation in it. We have already done this above. Apart from the signal status, the fe_Get_Entry_Signal function returns order placement, Stop Loss and Take Profit levels. Therefore, let's remove the appropriate part of the code from the previous EA version adding the variables for accepting levels from the function and edit the function call itself. The listings of the old and new code blocks can be found in the attached file (strings 128-141).


Another significant addition to the basic EA code is due to the fact that, unlike the previous two, this TS deals with a short-term trend. It assumes that the roll-back happens once a day and is unlikely to be repeated. This means that the robot has to make only one entry ignoring the existing signal all the rest of the time until the next day. The easiest way to implement that is to use a special flag — static or global variable of bool type in the program memory. But if the EA operation is interrupted for some reason (the terminal is closed, the EA is removed from the chart, etc.), the flag value is lost as well. Thus, we should have the ability to check if today's signal was activated previously. To do this, we may analyze the history of trades for today or store the date of the last entry in the terminal global variables rather than in the program. Let us use the second option since it is much easier to implement.


Provide users with the ability to manage 'one entry per day' option and set an ID of each launched version of the robot — it is needed to use global variables of the terminal level:


input uint Magic_Number = 2018 ; // EA magic number.


Let's add the variables necessary to implement 'one entry per day' option to the program's global variables definition block. Initialize them in the OnInit function:


gs_Prefix // identifier of (super)global variables.


gs_Prefix = StringFormat ( "SSB %s %u %s" , _Symbol , Magic_Number, MQLInfoInteger ( MQL_TESTER ) ? "t " : "" );


gb_Position_Today = int ( GlobalVariableGet (gs_Prefix + "Last_Position_Date" )) == TimeCurrent () — TimeCurrent () % 86400 ;


gb_Pending_Today = int ( GlobalVariableGet (gs_Prefix + "Last_Pending_Date" )) == TimeCurrent () — TimeCurrent () % 86400 ;


Here the robot reads the values of global variables and compares the written time with the day start time, thus defining if the today's signal has already been processed. Time is written to the variables in two places — let's add the appropriate block to the pending order installation code (additions highlighted):


if (Log_Level > LOG_LEVEL_NONE) Print ( "Pending order placing error" );


// the distance from the current price is not enough :(


if (Log_Level > LOG_LEVEL_ERR)


PrintFormat ( "Pending order cannot be placed at the %s level. Bid: %s Ask: %s StopLevel: %s" ,


DoubleToString (d_Entry_Level, _Digits ),


DoubleToString (go_Tick. bid, _Digits ),


DoubleToString (go_Tick. ask, _Digits ),


DoubleToString (gd_Stop_Level, _Digits )


// to update the flag:


GlobalVariableSet ( // in the terminal global variables.


TimeCurrent () — TimeCurrent () % 86400.


gb_Pending_Today = true ; // in the program global variables.


The second block is placed after the code defining a newly opened position:


if ( PositionGetDouble ( POSITION_SL ) == 0 .)


// update the flag:


GlobalVariableSet ( // in the terminal global variables.


TimeCurrent () — TimeCurrent () % 86400.


gb_Position_Today = true ; // in the program global variables.


These are the only significant changes in the previous EA version code. The finalized source code of the new version is attached below.


Strategy backtesting.


In order to illustrate the trading system viability, its authors use patterns detected on the charts from the end of the last century. Therefore, we need to check its relevance in today's market conditions. For testing, I took the most popular Forex pair EURUSD, the most volatile pair USDJPY and one of the metals — XAUUSD. I increased the indents specified by Raschke and Connors 10 times, since four-digit quotes were used when the book was written, while I tested the EA on five-digit ones. Since there is no any guidance concerning the trailing parameters, I have selected the ones that seem to be most appropriate to daily timeframe and instrument volatility. The same applies to the Take Profit calculation algorithm added to the original rules — the ratio for its calculation was chosen arbitrarily, without deep optimization.


The balance chart when testing on the five-year EURUSD history with the original rules (no Take Profit):


The same settings and Take Profit:


The balance chart when testing the original rules on the five-year USDJPY history:


The same settings and Take Profit:


The balance chart when testing the original rules on the daily gold quotes for the last 4 years:


The full data on the robot settings used in each test can be found in the attached archive containing the complete reports.


Conclusão.


The rules programmed in the signal module match the 80-20 trading system description provided by Linda Raschke and Laurence Connors in their book "Street Smarts: High Probability Short-Term Trading Strategies". However, we have extended the original rules a bit. The tools (the robot and the indicator) are to help traders draw their own conclusions concerning the TS relevance in today's market. In my humble opinion, the TS needs a serious upgrade. In this article, I have tried to make some detailed comments on developing the code of the signal module, as well as the appropriate robot and indicator. I hope, this will help those who decide to do the upgrade. Apart from modifying the rules, it is also possible to find trading instruments that fit better to the system, as well as signal detection and tracking parameters.


Traduzido do russo pela MetaQuotes Software Corp.

Comments

Popular Posts