Rejoindre la communauté
banner_forum
Devenez membre de la plus grande
communauté francophone sur le Forex
Partagez, échangez et apprenez en gagnant des crédits sur votre compte de trading

Chandeliers EA sans martingale

  • lefeuvr3

    Code
    //+------------------------------------------------------------------+ //| Candles Harami Engulfing Star.ex4 | //| Copyright 2019, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2019, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict //+------------------------------------------------------------------+ extern int MagicNumber=26022020; extern double LotFactor=210; extern double StopLoss=117; extern double TakeProfit=0; extern int TrailingStop=43; extern int Slippage=3; extern int min_gap_size=7;//Min gap size in points //+------------------------------------------------------------------+ // expert start function //+------------------------------------------------------------------+ int start() { double Lots = (AccountEquity() * 0.01 /LotFactor); double MyPoint=Point; if(Digits==3 || Digits==5) MyPoint=Point*10; double TheStopLoss=0; double TheTakeProfit=0; if( TotalOrdersCount()==0 ) { int result=0; if (Open[0]>Close[0]&&Open[0]>Open[1]&&Close[0]>Open[1]&&Close[0]>Close[1]-min_gap_size*Point&&Open[2]<Open[3]&&Open[2]<Close[3]&&Close[2]<Open[3]&&Close[2]<Close[3]&&Open[3]<Close[3]&&Close[1]>Open[1])//Star { result=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; //OrderSelect(result,SELECT_BY_TICKET); if(OrderSelect(result, SELECT_BY_TICKET)) bool modif1=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]>Close[0]&&Open[0]>Open[1]&&Close[0]>Open[1]&&Close[0]>Close[1]-min_gap_size*Point&&Open[2]<Open[3]&&Open[2]<Close[3]&&Close[2]<Open[3]&&Close[2]<Close[3]&&Open[3]<Close[3]&&Close[1]<Open[1])//Star { result=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif2=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Close[1]>Open[1]&&Open[0]>Close[0]&& Close[0]<Close[1]&&Close[0]<Open[1]&&Open[0]>Open[1]&&Open[0]>Close[1])//Harami { result=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif3=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[1]<Close[1]&&Open[0]<Close[1]&& Open[0]>Open[1]&&Close[0]<Close[1]&&Close[0]>Open[1]&&Open[0]<Close[1]&&Open[0]>Open[1]&&Close[0]<Close[1]&&Close[0]>Open[1])//engulfing { result=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif4=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]>Close[0]&&Close[0]>Open[1]&&Open[1]==Low[1]&&Close[1]>Open[1]&&Open[2]<Close[2]&&Close[1]<Close[2]) // Holding Belt // Here is your open Buy rule bearish gap { result=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif5=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]<Close[0]&&Open[0]<Open[1]&&Close[0]<Open[1]&&Close[0]<Close[1]+min_gap_size*Point&&Open[2]>Open[3]&&Open[2]>Close[3]&&Close[2]>Open[3]&&Close[2]>Close[3]&&Open[3]>Close[3]&&Close[1]<Open[1])//Star { result=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif6=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]<Close[0]&&Open[0]<Open[1]&&Close[0]<Open[1]&&Close[0]<Close[1]+min_gap_size*Point&&Open[2]>Open[3]&&Open[2]>Close[3]&&Close[2]>Open[3]&&Close[2]>Close[3]&&Open[3]>Close[3]&&Close[1]>Open[1])//Star { result=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif7=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Close[1]<Open[1]&&Open[0]<Close[0]&& Close[0]>Close[1]&&Close[0]>Open[1]&&Open[0]<Open[1]&&Open[0]<Close[1])// Harami { result=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif8=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[1]>Close[1]&&Open[0]>Close[1]&& Open[0]<Open[1]&&Close[0]>Close[1]&&Close[0]<Open[1]&&Open[0]>Close[1]&&Open[0]<Open[1]&&Close[0]>Close[1]&&Close[0]<Open[1])//Engulfing { result=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif9=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]<Close[0]&&Close[0]<Open[1]&&Open[1]==High[1]&&Close[1]<Open[1]&&Open[2]>Close[2]&&Close[1]>Close[2])// Holding Belt // Here is your open Sell rule bullish gap { result=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif10=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } } for(int cnt=0;cnt<OrdersTotal();cnt++) { if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES)) if(OrderType()<=OP_SELL && OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber ) { if(OrderType()==OP_BUY) { if(TrailingStop>0) { if(Bid-OrderOpenPrice()>MyPoint*TrailingStop) { if(OrderStopLoss()<Bid-MyPoint*TrailingStop) { bool modif11= OrderModify(OrderTicket(),OrderOpenPrice(),Bid-TrailingStop*MyPoint,OrderTakeProfit(),0,Green); return(0); } } } } else { if(TrailingStop>0) { if((OrderOpenPrice()-Ask)>(MyPoint*TrailingStop)) { if((OrderStopLoss()>(Ask+MyPoint*TrailingStop)) || (OrderStopLoss()==0)) { bool modif12= OrderModify(OrderTicket(),OrderOpenPrice(),Ask+MyPoint*TrailingStop,OrderTakeProfit(),0,Red); return(0); } } } } } } return(0); } int TotalOrdersCount() { int result=0; for(int i=0;i<OrdersTotal();i++) { bool modif13= OrderSelect(i,SELECT_BY_POS ,MODE_TRADES); if (OrderMagicNumber()==MagicNumber) result++; } return (result); }
  • lefeuvr3

    Test strategique
    lefeuvr3 a joint une image
    chandeliers-ea-sans-martingale-12012
  • lefeuvr3

    Autre version ....Chandeliers EA avec Martingale

    Code
    //+------------------------------------------------------------------+ //| Candles Harami Engulfing Star Martingale.mq4 | //| Copyright 2019, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2019, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict extern int MagicNumber=27022020; extern double StopLoss=117; extern double TakeProfit=0; extern int TrailingStop=43; extern int Slippage=3; extern int min_gap_size=7;//Min gap size in points //+------------------------------------------------------------------+ // Martingale //+------------------------------------------------------------------+ extern int LotFactor=210; double last_profit, last_lot; int last_tip; extern double MartingalePower=4.5; //+------------------------------------------------------------------+ // expert start function //+------------------------------------------------------------------+ int start() { //+------------------------------------------------------------------+ // Martingale //+------------------------------------------------------------------+ double Lot = (AccountEquity() * 0.01 /LotFactor); if( OrdersTotal() == 0 && OrdersHistoryTotal() == 0) Lot = (AccountEquity() * 0.01 /LotFactor); else if( OrdersTotal() == 0&& OrdersHistoryTotal() > 0 ) last_history_profit(); if( last_profit < 0 ) Lot = MartingalePower*last_lot; if( last_profit > 0 ) Lot = (AccountEquity() * 0.01 /LotFactor); //+------------------------------------------------------------------+ // //+------------------------------------------------------------------+ double MyPoint=Point; if(Digits==3 || Digits==5) MyPoint=Point*10; double TheStopLoss=0; double TheTakeProfit=0; if( TotalOrdersCount()==0 ) { int result=0; if (Open[0]>Close[0]&&Open[0]>Open[1]&&Close[0]>Open[1]&&Close[0]>Close[1]-min_gap_size*Point&&Open[2]<Open[3]&&Open[2]<Close[3]&&Close[2]<Open[3]&&Close[2]<Close[3]&&Open[3]<Close[3]&&Close[1]>Open[1])//Star { result=OrderSend(Symbol(),OP_BUY,/* Martingale*/Lot,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; //OrderSelect(result,SELECT_BY_TICKET); if(OrderSelect(result, SELECT_BY_TICKET)) bool modif1=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]>Close[0]&&Open[0]>Open[1]&&Close[0]>Open[1]&&Close[0]>Close[1]-min_gap_size*Point&&Open[2]<Open[3]&&Open[2]<Close[3]&&Close[2]<Open[3]&&Close[2]<Close[3]&&Open[3]<Close[3]&&Close[1]<Open[1])//Star { result=OrderSend(Symbol(),OP_BUY,/* Martingale*/Lot,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif2=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Close[1]>Open[1]&&Open[0]>Close[0]&& Close[0]<Close[1]&&Close[0]<Open[1]&&Open[0]>Open[1]&&Open[0]>Close[1])//Harami { result=OrderSend(Symbol(),OP_BUY,Lot,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif3=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[1]<Close[1]&&Open[0]<Close[1]&& Open[0]>Open[1]&&Close[0]<Close[1]&&Close[0]>Open[1]&&Open[0]<Close[1]&&Open[0]>Open[1]&&Close[0]<Close[1]&&Close[0]>Open[1])//engulfing { result=OrderSend(Symbol(),OP_BUY,/* Martingale*/Lot,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif4=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]>Close[0]&&Close[0]>Open[1]&&Open[1]==Low[1]&&Close[1]>Open[1]&&Open[2]<Close[2]&&Close[1]<Close[2]) // Holding Belt // Here is your open Buy rule bearish gap { result=OrderSend(Symbol(),OP_BUY,/* Martingale*/Lot,Ask,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Blue); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif5=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]<Close[0]&&Open[0]<Open[1]&&Close[0]<Open[1]&&Close[0]<Close[1]+min_gap_size*Point&&Open[2]>Open[3]&&Open[2]>Close[3]&&Close[2]>Open[3]&&Close[2]>Close[3]&&Open[3]>Close[3]&&Close[1]<Open[1])//Star { result=OrderSend(Symbol(),OP_SELL,/* Martingale*/Lot,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif6=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]<Close[0]&&Open[0]<Open[1]&&Close[0]<Open[1]&&Close[0]<Close[1]+min_gap_size*Point&&Open[2]>Open[3]&&Open[2]>Close[3]&&Close[2]>Open[3]&&Close[2]>Close[3]&&Open[3]>Close[3]&&Close[1]>Open[1])//Star { result=OrderSend(Symbol(),OP_SELL,/* Martingale*/Lot,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif7=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Close[1]<Open[1]&&Open[0]<Close[0]&& Close[0]>Close[1]&&Close[0]>Open[1]&&Open[0]<Open[1]&&Open[0]<Close[1])// Harami { result=OrderSend(Symbol(),OP_SELL,/* Martingale*/Lot,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif8=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[1]>Close[1]&&Open[0]>Close[1]&& Open[0]<Open[1]&&Close[0]>Close[1]&&Close[0]<Open[1]&&Open[0]>Close[1]&&Open[0]<Open[1]&&Close[0]>Close[1]&&Close[0]<Open[1])//Engulfing { result=OrderSend(Symbol(),OP_SELL,/* Martingale*/Lot,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif9=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } if (Open[0]<Close[0]&&Close[0]<Open[1]&&Open[1]==High[1]&&Close[1]<Open[1]&&Open[2]>Close[2]&&Close[1]>Close[2])// Holding Belt // Here is your open Sell rule bullish gap { result=OrderSend(Symbol(),OP_SELL,/* Martingale*/Lot,Bid,Slippage,0,0,"EA Generator www.ForexEAdvisor.com",MagicNumber,0,Red); if(result>0) { TheStopLoss=0; TheTakeProfit=0; if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint; if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint; if(OrderSelect(result, SELECT_BY_TICKET)) bool modif10=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(TheStopLoss,Digits),NormalizeDouble(TheTakeProfit,Digits),0,Green); } return(0); } } for(int cnt=0;cnt<OrdersTotal();cnt++) { if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES)) if(OrderType()<=OP_SELL && OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber ) { if(OrderType()==OP_BUY) { if(TrailingStop>0) { if(Bid-OrderOpenPrice()>MyPoint*TrailingStop) { if(OrderStopLoss()<Bid-MyPoint*TrailingStop) { bool modif11= OrderModify(OrderTicket(),OrderOpenPrice(),Bid-TrailingStop*MyPoint,OrderTakeProfit(),0,Green); return(0); } } } } else { if(TrailingStop>0) { if((OrderOpenPrice()-Ask)>(MyPoint*TrailingStop)) { if((OrderStopLoss()>(Ask+MyPoint*TrailingStop)) || (OrderStopLoss()==0)) { bool modif12= OrderModify(OrderTicket(),OrderOpenPrice(),Ask+MyPoint*TrailingStop,OrderTakeProfit(),0,Red); return(0); } } } } } } return(0); } int TotalOrdersCount() { int result=0; for(int i=0;i<OrdersTotal();i++) { bool modif13= OrderSelect(i,SELECT_BY_POS ,MODE_TRADES); if (OrderMagicNumber()==MagicNumber) result++; } return (result); } //+------------------------------------------------------------------+ // Martingale //+------------------------------------------------------------------+ double last_history_profit() { double cpte_profit = 0; if( OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY) ) { if( OrderMagicNumber() == MagicNumber ) { last_profit = OrderProfit(); last_lot = OrderLots(); last_tip = OrderType(); } } return(0); } //+------------------------------------------------------------------+
    lefeuvr3 a joint une image
    chandeliers-ea-sans-martingale-12013
  • lefeuvr3

    Rappel de l' efficience statistique des chandeliers et figures

    Code
    151402 figures détectées du 03/12/91 au 10/11/06 sur titres du Premier Marché NOM FIGURE TYPE HAUSSE Etoile du matin Doji HAUSSE 80,8% Etoile du matin HAUSSE 77,2% Passant de ceinture haussier HAUSSE 73,7% Fenetre haussiere HAUSSE 69,7% Avalement haussier HAUSSE 68,6% Expulsion haussiere HAUSSE 68,5% Ejection haussiere HAUSSE 67,8% Pénétrante HAUSSE 66,9% Marteau HAUSSE 63,4% Harami haussier HAUSSE 61,3% Marteau Inversé HAUSSE 54,2% Avalement baissier ultime HAUSSE 54,0% Creux en pince HAUSSE 53,6% NOM FIGURE TYPE BAISSE Avalement haussier ultime BAISSE 59,6% Pendu BAISSE 63,7% Harami baissier BAISSE 67,8% Sommet en pince BAISSE 69,6% Ejection baissiere BAISSE 70,1% Etoile filante BAISSE 70,2% Fenetre baissiere BAISSE 71,3% Expulsion baissiere BAISSE 71,7% Etoile du soir Doji BAISSE 73,5% Avalement baissier BAISSE 73,7% Nuage Noir BAISSE 74,6% Etoile du soir BAISSE 79,4% Passant de ceinture baissier BAISSE 79,7%