I am using this code to access a secondary instrument: AddDataSeries("MES 09-19", Data.BarsPeriodType.Minute, 1, Data.MarketDataType.Last);
My strategy is running on primary instrument "ES" but my orders are being executed in "MES".
Is there a way to replace "MES 09-19" for a variable?
My idea is to have this as an input with a drop-down box where I can select the instrument I want.
Usually we have this "field" for the inputs.
[NinjaScriptProperty]
[Range(1, int.MaxValue)]
[Display(Name="Test", Order=1, GroupName="Parameters")]
public int Test
{ get; set; }
How to properly code for a instrument selection?
Thanks in advance,
Allan
Comment