and also "hand-shakes" between Order Submission and callback OrderStates to clean everything up.
I did have an issue before I realized that the OnOrderUpdate appears to execute on the "Dispatch" or "GUI" thread,
so I was getting some queueing deadlocks; once I realized that, now the multi-threading works great !!
I handle dozens to hundreds of "positions" each of which represent an Entry and a matching Exit volume; which I can then use to
do a LIFO accounting; keeping track of every position's Entry and Exit pricing (like MetaTrader Forex does with "deals")
so that I can know how much Partial Profit I've taken during a wider "trading frame"; where my open Losses are countered
by my closed Profits during the entire process.
I call this "micro incremental scalping" and I need this synthetic LIFO accounting in the Order Manager to keep track of
progress. So it's really the concept of a "Meta Trade" which consists of many individual brokerage trade positions; which
eventually becomes "flat", and that process could take half an hour; but is usually much shorter than that.
AGAIN, NinjaTrader 8 is just Great Engineering; and I've been on a learning curve for just coming up to 1 year now...
hyperscalper
Comment