https://fxdreema.com/shared/N9yGRXNce
@l'andorra
here it is. BTW it's Mike from your class 
It works now, but only after I changed the name of the project.
Newbie trying to design new EAs and one's based on a course I took in 2014.
https://fxdreema.com/shared/N9yGRXNce
@l'andorra
here it is. BTW it's Mike from your class 
It works now, but only after I changed the name of the project.
Wow, @sktsec, I am truly appreciative of you taking so much time to help me with this. I'm a relatively new programmer (@l-andorrĂ is an incredible teacher) so it might take me some time to figure out exactly what your demo is doing and how I can modify it to try and get my results. I will keep you both updated!! Have a great weekend and truly thanks again to you both!
Thanks @l-andorrĂ ! I'll check it out.
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!
@fxDreema @Administrator can anyone help? Am I not including the right handles?
Just looked and they are different by 1, which makes sense as the group numbers are 1 and 2.
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.
@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.
@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.
@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.
@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.