I'm using a modified version of the DipBuyer strategy (basically buy a limit order at 8% below the close).
I would like to create some logic that mirrors the trade being executed and keep track of the cumulative profit for that stock. If the number of synthetic trades is greater than some number and the cumulative profit is less than zero, I want to disable trading until the synthetic cumulative profit is back over zero.
I've been adding the cumulative profit counter value to each trade and what I see doesn't match up with the actual cumulative profit of the real trades.
Not sure what I'm doing wrong:
CODE:
Please log in to see this code.