Un EA de trading HFT (Trading à haute fréquence) pour les indices synthétiques Deriv (Volatility 100) et le Forex

Specification

if(bearishCross && sells<MaxTradesPerSym)
   {
      sl = NormalizeDouble(ask + stoploss,(int)SymbolInfoInteger(symbol,SYMBOL_DIGITS));
      tp = NormalizeDouble(ask - stoploss*TakeProfitRR,(int)SymbolInfoInteger(symbol,SYMBOL_DIGITS));
      trade.SetExpertMagicNumber(MagicNumber);
      trade.Sell(volume,symbol,bid,sl,tp,"EA_SELL");
      lastActionTime=TimeCurrent();
   }

   ManageTrailing(symbol);
}
//+------------------------------------------------------------------+
void CountOpen(string sym,int &buy,int &sell)
{
   buy=0; sell=0;
   for(int i=PositionsTotal()-1;i>=0;i--)
   {
      if(PositionSelectByTicket(PositionGetTicket(i)))
      {
         if(PositionGetString(POSITION_SYMBOL)==sym && PositionGetInteger(POSITION_MAGIC)==MagicNumber)
         {
            if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY) buy++;
            if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_SELL) sell++;
         }
      }
   }
}
//+------------------------------------------------------------------+
double CalcLotByRisk(string sym,double slPts,double riskP)
{
   double bal=AccountInfoDouble(ACCOUNT_BALANCE);
   double riskMoney=bal*riskP/100.0;
   if(riskMoney<=0) return 0.0;
   double tickVal=SymbolInfoDouble(sym,SYMBOL_TRADE_TICK_VALUE);
   double tickSize=SymbolInfoDouble(sym,SYMBOL_TRADE_TICK_SIZE);
   if(tickVal<=0||tickSize<=0) return 0.0;
   double lossPerLot=slPts*(tickVal/tickSize);
   if(lossPerLot<=0) return 0.0;
   double lots=riskMoney/lossPerLot;
   return NormalizeVolume(sym,lots);
}
//+------------------------------------------------------------------+
double NormalizeVolume(string sym,double vol)
{
   double step=SymbolInfoDouble(sym,SYMBOL_VOLUME_STEP);
   double minv=SymbolInfoDouble(sym,SYMBOL_VOLUME_MIN);
   double maxv=SymbolInfoDouble(sym,SYMBOL_VOLUME_MAX);
   if(step<=0) step=0.01;
   double n=MathFloor(vol/step)*step;
   if(n<minv) n=minv;
   if(n>maxv) n=maxv;
   int digits=(step<1)?(int)MathRound(MathAbs(MathLog10(step))):0;
   return NormalizeDouble(n,digits);
}
//+------------------------------------------------------------------+
void ManageTrailing(string sym)
{
   for(int i=PositionsTotal()-1;i>=0;i--)
   {
      if(!PositionSelectByTicket(PositionGetTicket(i))) continue;
      if(PositionGetString(POSITION_SYMBOL)!=sym) continue;
      if(PositionGetInteger(POSITION_MAGIC)!=MagicNumber) continue;

      int type=PositionGetInteger(POSITION_TYPE);
      double openPrice=PositionGetDouble(POSITION_PRICE_OPEN);
      double sl=PositionGetDouble(POSITION_SL);
      double curr=(type==POSITION_TYPE_BUY)?SymbolInfoDouble(sym,SYMBOL_BID):SymbolInfoDouble(sym,SYMBOL_ASK);
      double point=SymbolInfoDouble(sym,SYMBOL_POINT);
      double digits=(int)SymbolInfoInteger(sym,SYMBOL_DIGITS);

      double profitPts=(type==POSITION_TYPE_BUY)?(curr-openPrice)/point:(openPrice-curr)/point;
      if(profitPts>TrailingStartPts)
      {
         double newSL=(type==POSITION_TYPE_BUY)?curr - TrailingStepPts*point:curr + TrailingStepPts*point;
         if((type==POSITION_TYPE_BUY && newSL>sl)||(type==POSITION_TYPE_SELL && newSL<sl))
         {
            trade.PositionModify(PositionGetInteger(POSITION_TICKET),NormalizeDouble(newSL,(int)digits),PositionGetDouble(POSITION_TP));
         }
      }
   }
}
//+------------------------------------------------------------------+

Responded

1
Developer 1
Rating
(1)
Projects
2
0%
Arbitration
2
0% / 0%
Overdue
0
Working
2
Developer 2
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
3
Developer 3
Rating
(295)
Projects
472
40%
Arbitration
102
40% / 24%
Overdue
78
17%
Busy
Published: 2 codes
4
Developer 4
Rating
(2)
Projects
2
0%
Arbitration
1
0% / 100%
Overdue
0
Free
Similar orders
Raymond Vergnes 30 - 200 USD
Bonjour, Je recherche un développeur pour introduire dans meta editor une formule Code MQL5 : Trailing Stop par Paliers que j'ai déjà. Ensuite je voudrais utiliser cette formule aussi bien sur mon ordinateur que sur mon téléphone avec méta trader 5. Vous pouvez me contacter par mail : raymondvergnes81@gmail.com Merci d'avance
Ichomoku crosser 30 - 100 USD
J’ai besoin d’un programmeur compétent pour me créer au robot capable de prendre des positions en suivant ma logique basé sur le nuage le lichimoku senkou spam a> à senkou spam B buy et senkou spam B<senkou spam a sell
Akaba Marc 100+ USD
Les conditions son clair les candidats pourront apprendre beaucoup sur les services du marketing dans le domaine du monde opératoire de l'utilisation du robot virtuel de nombreuses manières d'investissement et pourra pur jouer plusieurs rôles sur plusieurs plans
Robot sharkk meta5 50 - 120 USD
Bonjour je cherche un développeur expérimenté MT5 pour coder un expert advisor Je voudrais un robot automatique qui traîde avec un capital de 100 euro multi prise de position qui prend des position et les fermes seul adapter au marché actuel aucune limite journalière les ferme après 2 euro de gain et les ferme après 2 euro de perte . Précis et sécurisé prise de position rapide en m1

Project information

Budget
30 - 500 USD
Deadline
to 15 day(s)