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

Şartname

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));
         }
      }
   }
}
//+------------------------------------------------------------------+

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(1)
Projeler
2
0%
Arabuluculuk
2
0% / 50%
Süresi dolmuş
0
Serbest
2
Geliştirici 2
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
3
Geliştirici 3
Derecelendirme
(298)
Projeler
478
40%
Arabuluculuk
105
40% / 24%
Süresi dolmuş
82
17%
Yüklendi
Yayınlandı: 2 kod
4
Geliştirici 4
Derecelendirme
(2)
Projeler
2
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
Benzer siparişler
Recherche développeur MQL5 – Expert Advisor avec exécution automatique activable/désactivable Nom du projet : ESSO Smart Trend Pro – Multi-Timeframe Structure, Fibonacci & Heikin Ashi EA 1. Objectif du projet Je recherche un développeur MQL5 expérimenté pour créer un Expert Advisor personnalisé sur MetaTrader 5, destiné principalement aux indices synthétiques disponibles sur Deriv. L'objectif est d'automatiser une
GER40 asian box 9h 30 - 100 USD
Instrument : GER40.x uniquement Plateforme : MetaTrader 5 Compte : prop firm Logique de la stratégie : Analyse à 9h Identification de la liquidité présente côté haut ou côté bas Utilisation des niveaux BSL / SSL, PDH / PDL, Support / Résistance Détermination de la position du Pivot par rapport à l’Asian Box Pivot IN → scénario Reversal Pivot OUT → scénario Break Deux scénarios principaux : Liquidité basse → objectif
Destroyer 34 30+ USD
Je suis un testeur de robots trading merci de m'envoyer vos robot pour que je teste ça pour vous. Je suis un professionnel et je fais ceci pour aider les gens qui on des idées mais manque de moyen pour le faire
Golden boy 30+ USD
Je veux un bot qui achèteras et vendras au moment précis( qu’il trouvera bon) pour me permettre de miser peu et d’avoir plus gains.j’ai joins deux images prenez exemple sur la vente pour pouvoir améliorer le bot et j’aimerais qu’il soit facile à manier que même en dormons il ouvre des ordres et les fermes avant les pertes

Proje bilgisi

Bütçe
30 - 500 USD
Son teslim tarihi
to 15 gün