Trying to create synthetic trades as a filter
Author: djmundus
Creation Date: 10/10/2018 1:07 AM
profile picture

djmundus

#1
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.
profile picture

Eugene

#2
Hi Craig,

Cone already suggested back in August that your approach suffers from incorrect position handling. Before anything else please revisit this thread and correct the error:

How to compare entry date to current date in intraday chart, in post #4
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).