Is it possible (advisable) to pass Instrument from a Strategy to a hosted Indicator?
The question arises where :
- a Strategy hosts an Indicator,
- the Indicator must AddDataSeries in State.Configure, and
- the Series to add is dependant on the Instrument of the Strategy.
In the forum post (Instrument name for indicator of State.Configure ), it was "recommend to add or call any data based on the Instrument from within the calling strategy or indicator". I believe, an example is included in forum post (Help - Multi-market trading hours indicator ), where String StratExchange is passed to the hosted Indicator.
So, where in addition to Instrument.Exchange, I require Instrument.FullName and Instrument.MasterInstrument.InstrumentType, is it possible (advisable) to pass Instrument from the Strategy to a hosted Indicator as a single Instrument argument? Or, am I best to add two string arguments, FullName and InstrumentType?
Thanks
Shannon

Comment