Incoroporate existing function into EA code

工作已完成

执行时间1 一小时
客户反馈
Extremly informative and easy to work with.
员工反馈
Awesome Client (a coder who needed some guidance).

指定

The developer will create a usable function that uses the attached MUTEX code to stop an EA from opening orders on multiple charts at the same time.


I will then add the developers created function into my EA's code.


//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
class Mutex
  {
#ifndef MUTEX_TIMEOUT_MSEC
#define MUTEX_TIMEOUT_MSEC    60000 // Trade context busy maximum delay 
#endif

public:
   void                 Mutex()                     : mName("GV_Mutex"), mLocked(false) {Lock();}
   void                 Mutex(const string& aName)  : mName(aName), mLocked(false) {Lock();}
   void                ~Mutex() {Release();}
   void                 Lock(void)
     {
      if(mLocked)
         return;
      uint startWaitingTime  = 0;
      if(!GlobalVariableTemp(mName))
        {
         int err = GetLastError();
         if(err != ERR_GLOBAL_VARIABLES_PROCESSING)
           {
            PrintFormat("Mutex: GVSet Failed: %i", err);
           }
         return;
        }

      while(true)
        {
         if(!IsTradeContextBusy()&& GlobalVariableSetOnCondition(mName, 1, 0))
           {
            if(startWaitingTime != 0)
              {
               RefreshRates();
              }
            mLocked = true;
            return;
           }
         if(IsStopped())
           {
            Print("Mutex: The expert was terminated by the user!");
            return;
           }

         if(startWaitingTime == 0)
           {
            startWaitingTime  = GetTickCount(); // Remember start time.
           }
         else
           {
            uint delay = GetTickCount() - startWaitingTime;

            if(delay > MUTEX_TIMEOUT_MSEC)      // Abort.
              {
               PrintFormat("Wait time (%i sec) exceeded!", MUTEX_TIMEOUT_MSEC / 1000);
               return;
              }

            Sleep(1000);
           }
        }// while
     }  // Lock

   void              Release(void)
     {
      if(mLocked)
        {
         if(!GlobalVariableSet(mName, 0))
           {
            PrintFormat("Mutex: GlobalVariableSet(UNLOCK): Error #", _LastError);
           }

         mLocked=false;
        }
     }

   bool                 IsLocked(void)             const {return mLocked;}

private:
   string               mName;
   bool                 mLocked;
  }; // Mutex





反馈

1
开发者 1
等级
(12)
项目
17
29%
仲裁
6
17% / 67%
逾期
4
24%
空闲
相似订单
Hi, I am looking for a scalping bot, that will have below criteria: 1. Take a position in the direction of the market with 1 STANDARD LOT. 2. Wait for 125 seconds after entering the position. 3. Exit the position when the position shows $10 profit. 4. Scan multiple leading currencies for such setups. 5. More than 5 positions should not be open at a time. 6. Exit the position if the floating loss exceeds $100. 7
Hello I am looking for a developer to help me do modification on my custom ninjatrader 8 strategy and also backtest it in other to work perfectly your expertise is highly needed for this project Kindly reach out to me and let get started on the project Thanks
bonjour je cherche un developpeur pour coder un ea que j ai deja , il suffira juste de reproduire le meme , car cette ea fonctionne tres bien en demo mais pas en reel , je veux que celui ci fonctionne en reel , l ea sera donner au developpeur s 'occupant de reconstruire cette ea , merci a vous ! pour mt4
I need an expert in the development of a fully automated trading robot For MetaTrader. The Trading Robot must be "Web based" so it can be accessed or used through a website, You can view a screenshot here; https://www.awesomescreenshot.com/image/48030918?key=79b0ff91455d862746e9b649341f4cdb Why do i need? Simple Enough, This is what i need from my Trading Robot EA. The Trading Robot can only be accessed through a
Metatrader 30+ USD
I would like to calculate the deviations between the companies listed below with Meta Trader. Would you be interested? BETWEEN 01.00 AT NIGHT AND 00.00 OF THE NEXT DAY (FOR HOURS WHEN THE GOLD MARKET IS OPEN) *Instant comparison of prices of the same parities of different companies *Determination of deviation rates in downward or upward movements (average prices, prices below and above the average) *Detection of
Fully automated with profitable setfiles. I will pass you funded challenges in few days. Included: FXIFY, FTMO, KORTANA FX, The5ers, etc. You name it You dont have to do anything, just contact me and ill do rest
Greenprint strategy 30 - 100 USD
Hello i need someone who can create an indicator to show the resistance support and pivot areas like in the shown images the indicators are bollinger bands moving averages also we have rsi and ma . Pictures below. You should be able to do work properly requesting a trial check when work is complete the indicator should also work with synthetic indices
I want someone who can create a Automatic mobile trading bot/EA with my kind of strategy...Example: : When The market is buying and rejects an has created an M formation the First leg is higher than the second leg(first leg Higher high,second leg lower high then a line must touch the peak of the Higher high then connect with the peak of the lower High as a Footprint line,then there must be Another line that touches
SpotBot45 30+ USD
I know nothing about trading so am looking for a custom made automated trading bot with medium risk and maximum returns.I am looking for about a ten percent return per day minimum and minimise as much risk where possible
I would like to make a SMC EA for MT5 based on multi timeframes analyzing the price action. and make it more details with more user input added.'' source code needed'' First of all here's a video which helped me for this: https://www.youtube.com/watch?v=vEXji2ClXMc The ea should find a entry signal that based on the SMC concept below and each entry trigger can be turned on and off. Based on the Multi timeframe of

项目信息

预算
30+ USD
开发人员
27 USD
截止日期
 1  10 天