fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. jonatassantanacaje
    J
    • Profile
    • Following 3
    • Followers 0
    • Topics 5
    • Posts 15
    • Best 1
    • Controversial 0
    • Groups 0

    jonatassantanacaje

    @jonatassantanacaje

    2
    Reputation
    7
    Profile views
    15
    Posts
    0
    Followers
    3
    Following
    Joined Last Online

    jonatassantanacaje Unfollow Follow

    Best posts made by jonatassantanacaje

    • RE: Help - Custom MQL Code

      @jstap

      //--- importing required dll files
      #include <WinUser32.mqh>
      #import "user32.dll"
      int GetAncestor(int, int);
      #define MT4_WMCMD_EXPERTS  33020
      #import
      
      //+------------------------------------------------------------------+
      //|                                                                  |
      //+------------------------------------------------------------------+
      void SetAlgoTradingTo(bool trueFalse) {
          //--- getting the current status
          bool currentStatus = IsTradeAllowed();
          //--- if the current status is equal to input trueFalse then, no need to toggle auto-trading
          if(currentStatus != trueFalse) {
              //--- Toggle Auto-Trading
              int main = GetAncestor(WindowHandle(Symbol(), Period()), 2/*GA_ROOT*/);
              PostMessageA(main, WM_COMMAND,  MT4_WMCMD_EXPERTS, 0 );//Toggle Expert Advisor button
          }
      }
      
      posted in Questions & Answers
      J
      jonatassantanacaje

    Latest posts made by jonatassantanacaje

    • RE: Problem when using more than one graph

      @jstap right, but when it comes to calculating profit, it uses the balance value + constant (TP_Money), if a pair already has low equity and I open another pair, the profit value of that other pair will have to be much higher compared to to the value of the constant...

      exemple...

      I start the EA on the EURUSD pair, Balance $1000 + Constant (TP_Money) $50...

      My profit will only be realized when the equity reaches $1050 right...

      Let's say my Equity drops to $850 and I start another operation in gold for GBPUSD, the balance value will still be at $1000, so the GBPUSD operation will only close after I make $100 in profit instead of $50.

      posted in Questions & Answers
      J
      jonatassantanacaje
    • Problem when using more than one graph

      https://fxdreema.com/shared/DecAIEigd

      How can I use this EA independently from other pairs? Your balance and equity checking system will close all simultaneous operations...

      posted in Questions & Answers
      J
      jonatassantanacaje
    • RE: Equity Protector

      I don't know the reason, but now it's working correctly, it waits for all operations to close and then disables algotrading

      https://fxdreema.com/shared/RGgMbPFqd

      posted in Questions & Answers
      J
      jonatassantanacaje
    • RE: Equity Protector

      @jstap I need to close all open negotiations

      posted in Questions & Answers
      J
      jonatassantanacaje
    • Equity Protector

      I am doing this capital protector, its function is to close all open operations and shut down Algotrading.

      The problem is, before he can fill all open orders, algotrading is being deactivated, leaving orders open, how do I solve it?

      https://fxdreema.com/shared/YN4rngST

      posted in Questions & Answers
      J
      jonatassantanacaje
    • RE: Help - Custom MQL Code

      Thank you very much @willramsey
      Everything is working properly 🙏

      posted in Questions & Answers
      J
      jonatassantanacaje
    • RE: Help - Custom MQL Code

      @willramsey I don't need all the functions working, I just gave examples, whichever is easier to do will be ideal for me.

      Turn off automation or close all windows

      posted in Questions & Answers
      J
      jonatassantanacaje
    • RE: Help - Custom MQL Code

      @willramsey Hello, thank you for your attention, I need to turn off ALGOTRADING, because I have about 5 robots open at the same time on different charts, and all of them have to stop trading at the same time.

      posted in Questions & Answers
      J
      jonatassantanacaje
    • RE: Help - Custom MQL Code

      @jstap

      //--- importing required dll files
      #include <WinUser32.mqh>
      #import "user32.dll"
      int GetAncestor(int, int);
      #define MT4_WMCMD_EXPERTS  33020
      #import
      
      //+------------------------------------------------------------------+
      //|                                                                  |
      //+------------------------------------------------------------------+
      void SetAlgoTradingTo(bool trueFalse) {
          //--- getting the current status
          bool currentStatus = IsTradeAllowed();
          //--- if the current status is equal to input trueFalse then, no need to toggle auto-trading
          if(currentStatus != trueFalse) {
              //--- Toggle Auto-Trading
              int main = GetAncestor(WindowHandle(Symbol(), Period()), 2/*GA_ROOT*/);
              PostMessageA(main, WM_COMMAND,  MT4_WMCMD_EXPERTS, 0 );//Toggle Expert Advisor button
          }
      }
      
      posted in Questions & Answers
      J
      jonatassantanacaje
    • RE: Help - Custom MQL Code

      @jstap @l-andorrà @fxDreema

      posted in Questions & Answers
      J
      jonatassantanacaje