fxDreema

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

    Posts made by moreirajbn

    • Block "Check profit (unrealized)" is failing

      Hi, the block "Check profit (unrealized)" seems to be broken. Everything was working until yesterday, but now I get the compilation error:

      Compilation errors
      'OrderSwap' - function not defined
      'OrderCommission' - function not defined

      @fxDreema , can you please check this out?

      thanks

      posted in Questions & Answers
      M
      moreirajbn
    • MT5 project - Execution price of last trade, in a position with multiple entry levels

      Hi @fxDreema

      I'm having trouble getting the price for the last executed "trade", when a position with multiple entries is open. Block "For each position" returns only the entire position's price.

      Example of what I need:

      • EA opens a BUY position in EURUSD at 1.23000 , volume = 0.1 lot (trade 1)
      • EA adds (buy again) 0.1 lot to this position at 1.22500 (trade 2)
      • A SELL LIMIT order of 0.1 lot is executed at 1.22700 (trade 3), leaving only 0.1 lot open in the buy position

      What I want the EA to find are the price and volume of trade 3 (sell 0.1 lot at 1.22700), can you help me with that?

      I have tried combinations of blocks both "on Tick" (from "Bucket of positions") and "onTrade" ("Position decremented"), but none worked.

      Thanks a lot.

      posted in Questions & Answers
      M
      moreirajbn
    • RE: Problem with "check age" function

      @miro1360

      Awesome, thanks so much.... works perfectly now.

      I've been struggling with that for hours because the alternative solution is to use the "Delay" block, but for this block to work on the backtest, MT5 must open a .dll file and that was making the backtest intolerably slow (i.e. minutes to run a week on OHLC).

      now it runs perfectly and super-fast 🙂

      thanks again

      posted in Questions & Answers
      M
      moreirajbn
    • Problem with "check age" function

      @fxDreema - I'd like to check how many minutes have passed since the last position was closed, and only allow a new trade after "X" minutes. I tried the blocks "For each closed position" > "Check age", however, it seems like "For each closed position" is blocking the EA from trading, independently of the time I put in "Check age". This is the example: https://fxdreema.com/shared/gOc5xZ4nc

      "Check age" alone (without "For each closed position") does not do anything (EA keeps trading as if there was no "Check age").

      Are you able to see what is wrong?

      thanks

      posted in Questions & Answers
      M
      moreirajbn
    • 1
    • 2
    • 3
    • 4
    • 4 / 4