Please help to generate a logic that makes a stop limit order to be placed on LEVEL X if the price hits LEVEL Y.
As far as I understand to keep fire a stop order while condition is not true anymore I require to set a variable which is resided between the condition itself and SL order action. However, if my trigger condition is price and it steps away from the conditional level, the variable turns back to false as well. Hence order dies next bar.
The algorithm that I require seems extremely simple, but in reality I have no idea how to realize it...
I appreciate if you propose any operable logic. Pls see the illustration for better understanding what needs to be done.
Thnx
Comment