fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. jstap
    3. Posts
    • Profile
    • Following 2
    • Followers 222
    • Topics 37
    • Posts 9382
    • Best 1086
    • Controversial 23
    • Groups 0

    Posts made by jstap

    • RE: Close All MT5 trades quickly

      @JMaxFx This is not the post for that, start a fresh question, and add a shared link on what you have already done

      posted in Tutorials by Users
      jstap
      jstap
    • RE: SCALING IN ON A PROFITABLE POSITION

      Various ways, but I would check the no of running trades,, depending on this number, I would activate a different pips away block

      posted in Questions & Answers
      jstap
      jstap
    • RE: SCALING IN ON A PROFITABLE POSITION

      If you want a group take profit add this option:
      image.png

      posted in Questions & Answers
      jstap
      jstap
    • RE: Odd and Even Numbers

      To make this a little dynamic in 1 condition Bloch, text code input MathMod(constant, 2) == 0
      orange dot would be true and yellow dot would odd

      posted in Questions & Answers
      jstap
      jstap
    • RE: Please add menu for Project "Save as"

      It would be easier to have a copy function, but importing a copy only requires a couple of mouse clicks.

      posted in Questions & Answers
      jstap
      jstap
    • RE: SCALING IN ON A PROFITABLE POSITION

      To close all from TP - on trade tab - trade closed by TP - close all

      Is this placing a trade every 30 pips?

      posted in Questions & Answers
      jstap
      jstap
    • RE: Close All MT5 trades quickly

      @XDV You can find that here: https://fxdreema.com/forum/topic/19004/help-custom-mql-code?_=1718300737685

      posted in Tutorials by Users
      jstap
      jstap
    • RE: Close All MT5 trades quickly

      @zentex74 To do this you can add a global variable, then in your EA modify the terminal variable with the magic number. I have not tested this but it should work.

      On Tick Section

      mql5
      Copy code
      startTime = GetMicrosecondCount(); // Record start time
      sTrade.SetAsyncMode(true); // Enable asynchronous trade operations

      ClosePositionsByMagicNumber(magicNumberToClose); // Use the global variable for the magic number
      PrintPerformance(startTime); // Monitor performance

      ~next~

      Global Variables/Includes Section

      mql5
      Copy code
      #include <Trade/Trade.mqh>
      ulong startTime; // To store the start time for performance measurement
      CTrade sTrade; // Trade object used for operations
      int magicNumberToClose = 12345; // Magic number for trades to close (change as needed)

      Custom Functions Section

      mql5
      Copy code
      void ClosePositionsByMagicNumber(int magicNumber) {
      for (int cnt = PositionsTotal() - 1; cnt >= 0 && !IsStopped(); cnt--) {
      if (PositionSelectByIndex(cnt)) {
      // Check if the position's magic number matches the desired one
      if (PositionGetInteger(POSITION_MAGIC) == magicNumber) {
      // Close the position
      sTrade.PositionClose(PositionGetInteger(POSITION_TICKET), 100);
      uint code = sTrade.ResultRetcode();
      Print("Close result code: ", IntegerToString(code));
      }
      }
      }
      }

      void PrintPerformance(ulong startTime) {
      for (int i = 0; i < 100; i++) {
      Print("Elapsed time: ", IntegerToString(GetMicrosecondCount() - startTime), " microseconds. Open positions: ", IntegerToString(PositionsTotal()));
      if (PositionsTotal() <= 0) { break; }
      Sleep(100);
      }
      }

      posted in Tutorials by Users
      jstap
      jstap
    • RE: SCALING IN ON A PROFITABLE POSITION

      Add a shared link to see what you have done, and say what seems to not be working

      posted in Questions & Answers
      jstap
      jstap
    • RE: How to user Counter and Consecutive losses Box ?

      Remove the AND block and connect in a row, connecting orange and yellow makes the block irrelevant because this says if true or false pass onto the next block

      posted in Questions & Answers
      jstap
      jstap
    • RE: Please how to find the day of month

      @l-andorrà Maybe I sometimes prefer to use custom because it gives me a direct reference to what is happening. I also didn't test that to see what happened.

      posted in Questions & Answers
      jstap
      jstap
    • RE: Please Help, Check Profit: Total Sum of Money Including Swap and Commission Not Working Properly

      @Temmy-25 👍

      posted in Questions & Answers
      jstap
      jstap
    • RE: SCALING IN ON A PROFITABLE POSITION

      Pips away will do exactly what you are saying, because this can only be true if in profit. Choose 1 topic, and if you still struggle ask again there

      posted in Questions & Answers
      jstap
      jstap
    • RE: EA protection by license code

      Condition number == number if not terminate, this process can also be used to check account number

      posted in Questions & Answers
      jstap
      jstap
    • RE: Open Buy position at 15:55 Close Buy position at 09:40

      2 trees, 1st tree once a day - open, 2nd tree once a day - close

      posted in Questions & Answers
      jstap
      jstap
    • RE: Please how to find the day of month

      Download and test that, in the comment on backtest you will see it displays the current day of the month number

      posted in Questions & Answers
      jstap
      jstap
    • RE: Please Help, Check Profit: Total Sum of Money Including Swap and Commission Not Working Properly

      Try something like this: https://fxdreema.com/shared/jkvf1tQad

      posted in Questions & Answers
      jstap
      jstap
    • RE: assistance in reading the transaction price

      @Radek_M 👍

      posted in Questions & Answers
      jstap
      jstap
    • RE: Please how to find the day of month

      You can get it like this: https://fxdreema.com/shared/9qnCuF8Pd condition block variable == 19 will give you the what you want

      posted in Questions & Answers
      jstap
      jstap
    • RE: SCALING IN ON A PROFITABLE POSITION

      Pink blocks, pips away - buy/sell

      posted in Questions & Answers
      jstap
      jstap
    • 1
    • 2
    • 63
    • 64
    • 65
    • 66
    • 67
    • 469
    • 470
    • 65 / 470