I copied the NT sample on order update strategy template, OnOrderUpdate() method, to attempt the following:
1. Enter long if Close[1] > Open[1]
or
Enter short if Close[1] < Open[1]
2. Set initial stop loss to n ticks.
3. Cancel pending order if not filled after n bars.
4. If n ticks in profit then set stop loss to low/high of Open[1].
I can get this to happen once! Then the strategy seems to fall down and does not initiate any other orders. So it will submit an order with stop but then if it's not filled it cancels, then stops processing further signals.
If someone could point out what is wrong with it I would really appreciate it or point me in the direction of a sample strat with long and short entries in it that would achieve the above.
Thanks!
Comment