My strategy runs smoothly, except for one annoying little thing, which is that if I am currently in a position and a subsequent bar triggers the same conditions that put me in the market, then a new order will NOT be placed (good), because of my entries per direction rule, however the stop loss will change to the last bar that the conditions were true for (bad).
How can I prevent an action from triggering while I am in a position, if the action is part of the same condition group?
My stop code is placed directly above my entry action code, and as far as I can tell it needs to be, because nothing else quite worked properly. My stop is supposed to remain static whilst in a position, until a certain PnL calculation updates it, acting as a profit cushion. My stop does indeed remain static until told otherwise, unless, as I previously stated, the condition is true again on a new bar.
Halp!
Thanks.
Comment