then the next line of code says: if Order_State == "" or Order_State=="filled" or Order_State=="part filled" or Order_State=="rejected" then
{
if NTmarketPosition=0 and buy condition 1 = true then
{
Buy 1 contract at market;
Order_State = "initialized";
}
}
this gets around the problem that the NT function OrderStatus() does not return a string called "initialized" straight after an order is generated by e-signal or tradestation strategy code. once we know that an order has been filled, partfilled or rejected (or that no order exists ie empty string for Order_Status) we can then safely check NTmarketPosition to see what our position is at broker.
hope this can help Moscu in some way, or any one else.
good trading!
Rocket ^
Comment