From the UserGuide, when triggering a custom event, TriggerCustomEvent reliably synchronises all internal indexes and pointers to the current bar for access in subsequent code.
TriggerCustomEvent(Action<object> customEvent, object state)
For example, while "Close[0]" could be passed through, it would not be used in any of my subsequent code. I do not understand the logic of this. However, I do see the logic where the parameter is used in subsequent code as in the UserGuide example.
Comment