Double entry, trail 2nd order (if TP hits 1 st order)
-
I'm trying to create an EA where I take double orders on entry.
If the first order reaches TP, BE is moved on the second order and then trailed.
EA fails immediately when I run the strategy tester.
Any tip?
Can I do this more easily?Link
https://fxdreema.com/shared/GfHVEMXwdImage
https://ibb.co/MpF7kwN/Markus
-
@meken I am not sure what result you will get from adjust on init, may give you half of constant and you need something like +50%, I will also say if you change the constant after inserting then the variable will stay the same as on int and you may as well make this value your constant, put constant & variable in comment block to visually check. For your buy/sell group you want to use numbers, this just adds to the magic number so needs to do somthing like 1111+1=1112, in your trail use the group that you have added to the 2nd BUY/SELL so it only responds to these trades, move all from on trade to on tick (if you reed the instructions trail needs to be here), you can use flags on trade with a purple trade closed block to activate trail. This is how I would do, hope this helps.
-
@jstap Tnx... I´ll try this asap..:)
-
@meken Just a small note. Those 'pass' blocks on both 'on tick' and 'on trade' tabs are unnecessary. You can remove them.