I'm fairly new to NT, so please be gentle I have a question about order handling.
I trade an EOD strategy that enters a market as soon as the price exceeds a certain point. I've modelled this in my NT strategy with this line of code ("LongEntry()" calculates the breakout price) :
EnterLongStopLimit(DefaultQuantity, LongEntry(2.0, 15).Entry[0], LongEntry(2.0, 15).Entry[0], "LongEntry");
A trailing stop is then attached ("LongStop()" is my stop price) :
ExitLongStop(DefaultQuantity, LongStop(2.0, 5).Stop[0], "LongStop", "LongEntry");
Backtesting the strategy with these two lines of code works fine. However, as soon as I try to integrate the same sort of function calls to add short trades to the strategy things start to go downhill. The code looks like this:
// Set entry orders
EnterLongStopLimit(..., "LongEntry");
EnterShortStopLimit(..., "Short Entry");
// Set stop orders
ExitLongStop(..., "LongStop", "LongEntry");
ExitShortStop(..., "ShortStop", "ShortEntry");
The results show that NJ reverses the position when a new entry is generated -- i.e. the stops are no longer taken into account.
What am I not seeing?
Tradey
Comment