Starting with a simple question: Why in the various examples is the approach of tracking orders never (as far as I have seen) done as follows:
private Order entryOrder = null;
protected override void OnBarUpdate()
{
entryOrder = EnterLong(1, "MyEntry");
}
... but the assignment of entryOrder is only done typically in OnOrderUpdate, by checking that the order calling the method is e.g. "MyEntry", as in this case?
In other words, why is it impractical to link entryOrder to the order already at EnterLong?
Comment