I'm running into an issue where, within OnBarUpdate, I try to call the following code:
private void Stop_EndStrategy() { Stop_GoFlat(); // If no long/short positions, halt processing. if (Position.MarketPosition == MarketPosition.Flat) { haltProcessing = true; } }
If I take this bit of code out of the "protected override void OnBarUpdate()" section, everything compiles fine.
I checked the NT8 help files, but I'm wondering if I'm putting this method in the wrong place.
Can anyone help give some perspective?
Comment