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

Cherche codage EA breakheaven pour trading station FXCM

  • THEOBELAU

    bonjour,

    ea breakheaven tout simple
    entrée en position manuel puis brekheaven à partir de10 pips


    je suis preneur

    merci
  • Pickup

    bonjour , ici .

    Code
    //+------------------------------------------------------------------+ //| BreakEvenExpert_v1.mq4 | //| Copyright © 2006, Forex-TSD.com | //| //+------------------------------------------------------------------+ //---- input parameters extern double BreakEven = 10; // Profit Lock in pips int digit=0; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- return(0); } // ---- Trailing Stops void TrailStops() { int total=OrdersTotal(); for (int cnt=0;cnt<total;cnt++) { OrderSelect(cnt, SELECT_BY_POS); int mode=OrderType(); if ( OrderSymbol()==Symbol() ) { if ( mode==OP_BUY ) { if ( Bid-OrderOpenPrice()>Point*BreakEven ) { double BuyStop = OrderOpenPrice(); OrderModify(OrderTicket(),OrderOpenPrice(), NormalizeDouble(BuyStop, digit), OrderTakeProfit(),0,LightGreen); return(0); } } if ( mode==OP_SELL ) { if ( OrderOpenPrice()-Ask>Point*BreakEven ) { double SellStop = OrderOpenPrice(); OrderModify(OrderTicket(),OrderOpenPrice(), NormalizeDouble(SellStop, digit), OrderTakeProfit(),0,Yellow); return(0); } } } } } // ---- Scan Trades int ScanTrades() { int total = OrdersTotal(); int numords = 0; for(int cnt=0; cnt<total; cnt++) { OrderSelect(cnt, SELECT_BY_POS); if(OrderSymbol() == Symbol() && OrderType()<=OP_SELL) numords++; } return(numords); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { digit = MarketInfo(Symbol(),MODE_DIGITS); if (ScanTrades()<1) return(0); else if (BreakEven>0) TrailStops(); return(0); }//int start //+------------------------------------------------------------------+
    Modifié le 2017-02-27 18:30:18 par AliX
  • Pickup — en réponse à Pickup dans son message #107876

    oups c'était pour la plate forme fxcm , mince alors je t'ai link pour mt4 , dsl .