You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// You can replace a previous value (useful for live charts):sma.update('40',true);
However, it is unavailable for indicators such as DX. Any suggestions on replacing the last candle and the result of DX?
constdx=newDX(14);// I want to see results for what-if scenarios.constdxA=dx.update({high: 10,low: 3,close: 2});// I want to see the result without the previous updateconstdxB=dx.update({high: 8,low: 2,close: 6},true);
Thanks,
The text was updated successfully, but these errors were encountered:
Hi @ozum, the "replace" functionality is not yet available for all indicators. It's an early draft by @iam-rohid and myself and we are open to suggestions and Pull Requests.
Hi @ozum, the DX indicator doesn't have the "replace" functionality yet. To build it, it would be necessary to cache all its internal states (so a previous and current value can be stored) and forward the replace parameter to every call of setResult like here: https://github.com/bennycode/trading-signals/blob/v5.0.3/src/DX/DX.ts#L87
Hi,
In the README I saw the
replace
feature:However, it is unavailable for indicators such as
DX
. Any suggestions on replacing the last candle and the result of DX?Thanks,
The text was updated successfully, but these errors were encountered: