the title says it all, I have code posted below, first two show the code for the ExitLongStopLimit - working correctly - the stop limit order appears the whole time I am in the trade. When I do the same code for shorts but reversed, I get an error message that the ExitShortStopLimit cant be a lower price than my target limit price.
Here is the code block beginning with long entries
^^The one just above this sentence is the stop, and the target is an ExitLongLimit order triggered by a target criteria, It works as intended, I have a stop limit stop, and it does not interfere with the target when the target is triggered
Here is the Shorts code block: it is the exact same as the longs code block but reversed logic for shorts
Same as the longs - the two code lines just above this sentence are the stop limit - to act as a stop for this trade, the code lines below are the target = once the target is triggered, I want a limit order to appear to exit the trade, however, it does not work like the longs logic does
I always get the error message below when I enter the trade (even before the target is triggered). Now, if I simply add a // to the code line to ExitShortStopLimit, the trade works as intended - entry is good, and target exit is also good (works), but the trade has no stop, which is why I need the ExitShortStopLimit order.
Comment