fxDreema

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

    Posts made by MTAB

    • RE: Backtesting software/website suggestions?

      Thanks @l-andorrà ! I'll check it out.

      posted in General Discussions
      MTAB
      MTAB
    • Backtesting software/website suggestions?

      I know that the MT4 platform has its own backtester (and optimizer) but it's not going to win any awards. Does anyone use any software or a website service to backtest/optimize their EAs that they would recommend? I have been checking out forextester and it seems nice, but they cannot use EAs that use the iCustom function, which most of my EAs have. Thanks in advance!

      posted in General Discussions
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      Thanks @l-andorrà !

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      @fxDreema @Administrator can anyone help? Am I not including the right handles?

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      Just looked and they are different by 1, which makes sense as the group numbers are 1 and 2.

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      according to the blocks, no. According to what is happening on MT4 in live trading, yes. That's the mystery. There is NOTHING that should connect group 1 and 2. Yet it does.

      https://fxdreema.com/shared/uzMWwiEbe

      The variables that include 21H are group 1, and the variables that include 52H are group 2. If it isn't a bug then I have no idea what could be happening...unless the "Reference Price" being the "Current market price" is what is linking them, but I only added that after to see if that would still affect the trade.

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      @jstap i really appreciate all the time you have spent trying to help me with this. That makes sense, and just to be clear, the on trade blocks are also set up to operate on their respective group, and all they do is update the group variables when the pending order is created. I later tried to fix the problem by changing the variables again once the trade filled, but that didn’t solve the problem.

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      @jstap that’s good advice thanks! The only thing is that they are pending orders set to fill at different prices. Their SLs are different and correct when they are pending (I checked on MT4). When the first order fills it has the correct SL, and the second order that is still pending has the correct SL. It’s only when the second order fills, that now both the first order (filled and in the market days before) and the second order are filled (at a different price) that the first and second orders SLs match. Anything that ever happens to any blocks are always limited to their particular group number so they shouldn’t overlap at all ever. Frustrating.

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      @l-andorrà manually changing the stop loss of one on MT4 would immediately change the stop loss of the other to match. They are always the same even if I make the code change the SL of one immediately after the second trade fills (days after the first trade has filled) it will modify the first trades SL to match.

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      @jstap maybe? That might explain why they initially have the same stop loss, but wouldn’t explain why manually changing the stop loss of one on MT4 would immediately change the stop loss of the other to match. It also doesn’t explain why they have the correct (different) stop loss while the orders are pending, but then when they fill (at different prices) they suddenly match.

      Also, the ATR stop loss is based on price as well (I believe) so price dictates the SL, and the EA is supposed to be coded such that if the trigger prices of each pending order is the same, there should only be one pending order.

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      @fxDreema , any ideas from these blocks why the SLs of the trades are linked?

      https://fxdreema.com/shared/uzMWwiEbe

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      Another piece of information for what it's worth. I tried to change the SL for group 1 manually, and it caused MT4 to also change the SL for group 2 to that same value at the same time. There is clearly some kind of link between group 1 and group 2 in the code, and there is nothing in my project that should cause group 1 to match anything in group 2. AH!

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      Thanks @l-andorrà and @jstap i really appreciate the help. One problem is that things work fine when testing. It’s during forward testing that things don’t match up. Again, everything works as it should until the second order actually fills, which is when the SL seems to change. Maybe I’ll just try to rebuild those blocks and see if that works. Thanks again you two!

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      https://fxdreema.com/shared/Kb8Lkt7B

      I think that's the best I can do to cut it down. 21 blocks. Just group 1 and 2, and just how to create pending orders and then storing the variables. Thoughts? I can't see anything wrong...but I'm still a newb.

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      That makes sense. This is the most basic aspect of the project. You can probably even ignore the manager blocks, but basically it just creates a pending trade for each group 1-4, stores their variables, deletes them each day if they don't hit, and repeat. Once a pending order does hit, it should be managed accordingly, but the issue is that the SL from group 1 and group 2 are different when they are both pending orders, and even once group 1 fills...and when group 2 fills, it doesn't use the stop loss it had when it was a pending order and instead changes to match the SL from group 1. Would anything in this simplified project make that happen?

      https://fxdreema.com/shared/tc6Ide3ze

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      That’s good advice, thanks! I will say that for this project, only the launcher and manager areas affect the SL. The change in SL appears to happen the moment the pending order from group 2 fills, if that helps.

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      Below is a link to the latest version trying to correct the SL issue. Am I correct in assuming that the block ID order shouldn't matter in this case, because one is the order created (pending order), and one is a trade created (trade filled)? The issue doesn't seem to be a problem when I run a back test, but I'm fairly sure this was an issue before the custom code was included.

      https://fxdreema.com/shared/f1lYnlnoe

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      @fxDreema Can you please help and see if this is a bug?

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      ok, I even tried to modify the stop loss AFTER the trade was executed, save it to the SL variable and it still has the same stop loss as the original (first) trade! It's driving me nuts!

      image.png

      image.png

      posted in Questions & Answers
      MTAB
      MTAB
    • RE: Pending order Stop Loss changes when it fills

      If this helps..

      image.png

      posted in Questions & Answers
      MTAB
      MTAB
    • 1
    • 2
    • 3
    • 1 / 3