Here is my problem:
I bought the permanent license and started trading live. My Tradestation strategy passes 2 opening orders to my middleware. One long and one short.
Because of the volatility in the markets, in the same bar, the short got triggered and a position was opened. In the same bar, the long open order, closed my short order. This was obviously wrong. Since Tradestation only cancels the other order at the close of the 2 min bar, there is nothing I can do.
The other problem is that the Trailing stop, Take Profit and stop loss need to be placed when the order is open and not at the close of the 2 min bar.
This lead me to implement this functions in my middleware as the NT .Net API does not allow for this functionality.
Here are the problems:
1.- NT is not event driven. This means that I have to monitor every order, at least once a second to see when they get filled as well as price to see when to move the stop. There is a need for event driven routines!
2.- Since I'm creating several orders when a position gets opened, it's Extremely important to know when the position gets closed so that I can cancel ALL the SL, TP and trailing stop orders. NT DOES NOT provide position information functions.
I don't quite know what to do at this point. I have only seen my losses accumulate due to the lack of functionality and I have also spend at least 200 hrs coding this middleware.
I need your help here. Some functionality needs to be added to the API.
Philip
Comment