Hi,
I've developed an indicator that has a parameter configurable.
The only way to recalculate the past when the parameter's configuration changes is saving the data at every interval?
Indicator recalculation
-
- Posts: 554
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 86 times
Re: Indicator recalculation
Hi,
If you are using Simplified API you need to call reload() method of your Api object on a parameter change.
If you are using Core API you need to call the invalidate() method of the InvalidateInterface object associated with your indicator.
If you are using Simplified API you need to call reload() method of your Api object on a parameter change.
Code: Select all
private Api api;
@Override
public void initialize(String alias, InstrumentInfo info, Api api, InitialState initialState) {
this.api = api;
Code: Select all
//on settings updated
api.reload();
Re: Indicator recalculation
I've tryed with the api.reload() but it doesn't recalculate the indicator for the past data
Check the image:
https://ibb.co/30QHw9P
Check the image:
https://ibb.co/30QHw9P
-
- Posts: 554
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 86 times
Re: Indicator recalculation
Does you module implement HistoricalDataListener or HistoricalModeListener?