I am working on a price action scale-in order management. The logic goes as this (long example): Once my 1st entry limit long is filled, I place a stop/target order for that. In the meanwhile I place a 2nd limit buy order at 50% pull back of the price action setup (the full range of the painted bars), and change my first target order to breakeven. During that time, if my first target is filled, I will cancel my 2nd limit buy (2nd buy is always above the stop loss). I found the scale-in order works if the 1st and 2nd order are filled on the same bar, however the scale-in order will not get filled on the subsequent bars.
Here are some visualization.
The 1st limit buy is submitted within OnBarUpdate() while the scale-in order is submitted within OnExecutionUpdate(), basically, I want the 2nd order to be submitted if I am already holding a position.
Is there something I am missing? Thank you very much.
Comment