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
EA 30+ USD
I have an EA bot CODE intend to be use on the MT5 platform, and all I need is a debug expert with full knowledge of what they are doing. The Skillset i need from you as a debugger are: 1. Trading Robot/Robot Debugging 2. Strategy Optimization 3. News Filter PS: I AM WILLING TO PAY $30 AS THAT IS WHAT I HAVE. IF YOU ARE NOT OKAY WITH THE PAY, PLEASE DON'T EVEN BOTHER DECLARING INTEREST I will send you the codes and
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
I have an unfinished section of code which uses, "While" and ,(ilowest_Symbol,PERIOD_M1,MODE_LOW) to find a continuously updated sequence of 8 different lows(and its previous low), and their price values. Only the 1st of 8 lows and it's price value, is currently found by the code, as the code needs more work. A more detailed description is provided to potential coders
I want to build a well performance mt4 indicator or trading view indicator for my strategy, please you must make sure you are a professional in building mt4 indicator or trading view indicator with serveral years of experience, so if you are kindly react to this and let talk more on how you will get my indicator working
EA development 30+ USD
HELLO there, am looking for some one that have serveral years of experience in developing a well performance EA, that can use both mt4, mt5 platform for development, please you most be an expert in the coding of EA , THANK YOU
All rights published by the owner. Its about experience and expert advisors may not be 100% accurate but they will assist you placing or execute trades when you are busy for you not to miss entries. Its a component of mixed confluence of strategies as it fit in my trading style
Hi guys I eould like to know if it‘s possible to draw highs and lows with a horizontal line in the line chart? It should be an indicator with buffers that I can integrate it into an EA. If it‘s possible please explain how you would detect those highs and lows. Thanks in advance
Smithdrift Ea 35+ USD
Ii have a manual trading trading I use to trade profitable Two time frame is use Indicators are Moving averages ,,macd,,and stochastic The strategy goes as follows ....on higher time frame window stochastic is concidered ... example 30 min time frame is use for this example ... stochastic on 30 min diverge. Main line dross signal line ()above that is a buy signal (2) 1 min chart is concider as filter ...macg default
Seeking someone who can create a robot or algorithm capable of sending 5-10 daily forex signals, each with 3 types of take profit, and achieving a high success rate similar to the one shown in the attached picture

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)