So basically when an order gets fired on broker this ID is probably going to change, allowing the Ninjascript developer no way to find that order again without annoying trickery?
Is this correct?
There is the undocumented Order.clientId field. Would this be the way forward? Otherwise how can one really do it?
You have this method: string[] entryOrder = GetAtmStrategyEntryOrderStatus("orderId");
Growing stack of phantom orders that will seem to be here for eternity from every time I call that function and its friends above, without OnBarUpdate passing (again ridiculous logic). It literally freeze NinjaTrader half the time. It doesnt care about my Try { } Catch {Exception e}
These GetAtm* methods are the most dangerous / badly coded functions in NinjaTrader seriously. Please escalate to dev team to fix.
I tried waiting a few seconds after calling atm create function first, still crashes ninjatrader / causes general quirks
I am nearing the end of working out work-around after work-around of Ninjascript but it has been legitimately painful experience coding for NinjaTrader.
My work around for not bricking things by avoiding calls like GetAtmStrategyEntryOrderStatus() is by looping Account.orders and looking for the original atm entry ID generated in my code, and cancel that one if it still exists (hasn't yet been replaced by server side ID that there is no connection via another property for developers [that is a major headache] if it is in state "Working".
Why should I the dev, need to do this? Etc etc.
Really dubious that I Have to do all this to avoid API bugs. Please forward to the team to deal with. Scalpers aren't waiting for OnBarUpdate(). The examples in the docs are not that useful.
I don't think these are huge missions to resolve. They are what should of been fixed in 2022.
One final thing, AtmStrategyCancelEntryOrder(orderId) accepts an order ID of the atm you created. Great.
Whats not great is Account.orders by the time I call this, this order has a server side ID and I have no solid means to identify that Entry order created via the ATM Create method vs what is now live on the server. Seems pretty basic to provide this data to developers otherwise how can they know for certain what order locally is now the one sitting on the broker. I.e. Your local Order ID in NinjaTrader "ABC" is now the Live order on server with ID "123". Order.BrokerId or something (doesn't exist). Or give undocumented Order.ClientId a purpose instead of always returning -1.
Also there is no real differentiation in the docs to suggest this limitation that local orderID gets blown away and why/how AtmStrategyCancelEntryOrder(orderId) can still magically access things with order IDs that don't exist in Account.Orders nor in OnExecutionUpdate nor OnOrderUpdate.
You can see what a confusing and how hours can be burned away. You can argue it has a logic to it, but the logic is confusing and can be done better, being blunt. I'm going over my code and am actually confused how I got all this to work, half the IDs I call aren't public properties in objects I reference. Ninja Trader playing Ninja with the developer when it should be behaving like a Samurai instead.
Thanks for your help thus far working with the product. I got it to behave good enough. The code can definitely not do all the GUI can in terms of ATMs. I look forward to server side code ATMs being a thing in future.
Note: I am a 20 year software development veteran and have dealt with many APIs. I have provided what I believe is valuable feedback that should be considered. Again thanks for your help with my other questions in other posts.

Comment