I need the following information to be available at Initialize for a strategy:
- Primary instrument name
- Its PeriodType (e.g. tick , range , renko)
- Its period / brick size
For getting this information on indicator , I used the following code:
if ( ChartControl != null) !!! do not use in strategy !!! {
sPr = ChartControl.BarsArray[0].ToString() ;
// Parse sPr to get the information.
// Use the information.
...................
}
It does not work for a strategy, as ChartControl is NULL.
Also I'm aware that the code above is awfully brute force and probably there are better methods to get this information.
Please help.

Comment