http://www.stevehopwoodforex.com/phpBB3 ... 79#p153767
Hi Fellow US Members,
Thanks to Steve's brilliance we have another amazing tool to add to our trading arsenal. Unfortunately, we have to follow the absurd fifo rules. Because of this, most of Steve's EAs simply won't trade properly for us. But now, thanks to Peaky we can join in on the fun.
I made a few edits and added some 'fifo code' to Peaky and she performs beautifully, even under complete fifo compliance (tests currently under way at Oanda and Forex.com).
The logic ended up being quite simple, if only 1 pending is open, we can modify that order to follow along when the market makes new highs or lows. If 1 market order is open or 2+ pending, we have to lump together the take profit values and halt further order modications.
Due to fifo rules, we have to use the 'hidden take profit' line to help manage trade closures. I have the default 'PipsHiddenFromCriminal' set to 10, and it works fine on M15. Twenty worked great on H1. The hidden take profit line guards against price hitting a 'broker hard' TP, God forbid that 'TP line's' trade ticket is out of 'fifo order'.
I threw this together last night so any ideas or suggestions are more than welcome. I need to stress that this version has only been tested for one night on demo accounts, so put it through the ringer before using on real account.
Green pips to all,
Gary
6-23-17 Edit:
New version with important code fixes
6-25-17 Edit:
version 1.1 with a logic fix.
7-5-17:
added option to vary lot amount to avoid fifo
7-6-17
bug fix
.