- Add indicators to signals programmatically
- Change their input settings programmatically
- Get data from them to use in signal logic
- See them on the chart
Code: Select all
private VariableSeries<double> adx_values;
private PowerLanguage.Function.ADX m_adx_indic;
protected override void Create() {
m_adx_indic = new PowerLanguage.Function.ADX(this);
}
protected override void StartCalc() {
m_adx_indic.Length = 20;
}
protected override void CalcBar(){
adx_values.Value = m_adx_indic[0];
StrategyInfo.SetPlotValue(0, adx_values.Value);
}
Is any of this made easier or faster using either AddIndicator or the CommandLine to add an indicator, as well as providing all of the flexibility that I listed at the top? (BTW: I don't mean just using ADX, that was just an example. It could be any indicator.)