This is very basically what I'm trying to achieve:
- enter a long or short position by a stop order at a slightly offset level once an indicator confirms - Can do this ok.
- Build in a cancel function whereby if the offset is not reached and price falls below the low of the bar the entry order was placed, the order is cancelled - I think I can do this.
- Once the order is executed, enter a protective stop at the low (or high if short) of the entry bar minus an offset. - I'm not sure about this, I tried to do it via the OnExecution() function. When testing a stop order is sent but cancelled straight away. Not sure why!
- The strategy should then reverse position when the indicator triggers again. - Not attempted this yet!
Any pointers you could give would be greatly appreciated, my hairline is visibly receding here!!
Thanks
Mark

Comment