Code: Select all
protected object AddIndicator(
Type type_of_indicator,
int data_stream
);
Code: Select all
protected object AddIndicator(
Type type_of_indicator,
int data_stream
);
Thanks. Sounds like the 2nd way is more appropriate and can avoid typo in the name string.Hello gztanwei,
You can access indicators data by one of the following methods:
1. Pass the indicator's name into the AddIndicator() function:
PowerLanguage.Indicator.ADX m_adx1;
m_adx1 = (PowerLanguage.Indicator.ADX)AddIndicator("ADX", 1);
2. Pass the types declaration for the required indicator into the AddIndicator() function:
PowerLanguage.Indicator.ADX m_adx2;
m_adx2 = (PowerLanguage.Indicator.ADX)AddIndicator(typeof(PowerLanguage.Indicator.ADX), 2);
Both ways provide the identical functionality.
For more information please refer to Type Class @ MSDN.