Apply a template.
ChartApplyTemplate seems to be a solution for restart the indicator.
But I want to be able to change parameters of the indicator.
for ex':
There is an RSI(21) indicator on the chart.
I press a key on the chart (for ex: 'q').
and then the indicator is RSI(22).
any suggestion?
Hi,
I have an indicator on the chart.
I want to be able to press a key on the chart, and this will simulate a restart of the indicator like it is drop on the chart for the first time.
Meaning:
I press a key on the chart (for ex: 'q').
this will call the DeInit function, and then the OnInit, and then the OnCalulate.
I succeeded doing this by simply calling the functions from the OnChartEvent function:
OnDeinit(INIT_PARAMETERS_INCORRECT);
OnInit();
int Tempspread[];
OnCalculate(Bars,0,Time,Open,High,Low,Close,Volume,Volume,Tempspread);
But this seems to me incorrect since those functions are high level functions.
Is there a function that can simulate this the correct way?
Thanks.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I have an indicator on the chart.
I want to be able to press a key on the chart, and this will simulate a restart of the indicator like it is drop on the chart for the first time.
Meaning:
I press a key on the chart (for ex: 'q').
this will call the DeInit function, and then the OnInit, and then the OnCalulate.
I succeeded doing this by simply calling the functions from the OnChartEvent function:
OnDeinit(INIT_PARAMETERS_INCORRECT);
OnInit();
int Tempspread[];
OnCalculate(Bars,0,Time,Open,High,Low,Close,Volume,Volume,Tempspread);
But this seems to me incorrect since those functions are high level functions.
Is there a function that can simulate this the correct way?
Thanks.