bennycode / trading-signals

Technical indicators to run technical analysis with JavaScript & TypeScript. 📈
https://bennycode.com/trading-signals
MIT License
628 stars 90 forks source link

update method in MACD.ts does not reflect replace argument #732

Open asamaru7 opened 1 day ago

asamaru7 commented 1 day ago

In the MACD.ts file, within the update(_price: BigSource, replace: boolean = false): void | MACDResult method, the replace argument is not being applied correctly. Specifically, the line:

const signal = this.signal.update(macd);

should be updated to:

const signal = this.signal.update(macd, replace);

This change ensures that the replace flag is properly passed to the update method of this.signal.

bennycode commented 1 day ago

@asamaru7 thanks for the finding. Can you please send a Pull Request to fix this?