Trabajo finalizado

Plazo de ejecución 1 hora
Comentario del Cliente
Extremly informative and easy to work with.
Comentario del Ejecutor
Awesome Client (a coder who needed some guidance).

Tarea técnica

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





Han respondido

1
Desarrollador 1
Evaluación
(12)
Proyectos
17
29%
Arbitraje
6
17% / 67%
Caducado
4
24%
Libre
Solicitudes similares
Create mt4 ea 50+ USD
To convert the provided MT4 indicator script into an Expert Advisor (EA) and implement prompt functionality for user input, we need to modify the code to handle external parameters and provide a user-friendly interface. Below is the EA code that incorporates prompts for user inputs
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
This is not an EA that actually opens/closes trades. Instead this project involves creating a dashboard where the user can create a grid trade scenario with initial entry and scale trade pip distances, lot sizes for each trade, and draw down amount. It then calculates the break-even + profit level where all trades would close. For each new scale trade the BE+ point is recalculated which is then displayed on the
Hi guys I would like to k ow if someone has experience with machine learning models? I would like to train a model to identify if there is a range market or trendy market based on several parameters like EMA and ATR for example. If we use for example a 20 and 50 EMA and we measure the distance between both lines the algo should oearn if the trend is strong or weak. If it‘s steong it keeps trending and if it‘s weak
Hello, I‘m interested in an indicator to predict the next candles probability (bullish or bearish). But honestly I have no idea how to do this. Would be interested in your opinion how we can create such an indicator. Please let me know if you‘ve done similar work
Hey greetings. Am in need of a developer that has already made profitable MT4 or MT5 EA that I can buy with the backtesting and proven result. How is the draw down ? What is the winning rate ? Kindly reply and let proceed
I will buy your EA for MT5, in case that on distance it is able to make a profit of 10% per month. - Martingale methods and grid strategies should not be used as the basis of a trading strategy. - Excellent win rate (>80%) - High risk/loss management - Option to select direction of trading (long, short or both) - News filter - Editable Trading Hours I will need to test in the strategy tester and on live market (on
Hello, i need a good programmer; to code an EA to trade the most productive forex pairs (mainly 2 for the day, and 2 for the night+gold), the strategy is based on the use of one moving average and the rsi, thank you in advance
a gap between 1 pip opposite order open continue once tp hit ea change position and start from 1 everything is manually adjustable tp gap pip and pip all show start from 0.01
I have a mql4 license mql4 code,, there have a 1 error '( WebRequest' - no one of the overloads can be applied to the function call) fix this error,, and make sure it work properly,,{ it's bass on kernel32.dll } this license system Base on pc volume serial number. If you're a expert developer kindly contact with me ,, Write a text " License system devoloper " Telegram @Gw_rakib1

Información sobre el proyecto

Presupuesto
30+ USD
Para el ejecutor
27 USD
Plazo límite de ejecución
de 1 a 10 día(s)