cinar / indicatorts

IndicatorTS - Stock technical indicators and strategies in TypeScript for browser and server programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Edit an indicator!

amiralii opened this issue · comments

Hello! I wanted to know how to edit an indicator? For example, I want to rewrite the Aroon indicator with the ability to change the period (it is fixed at 25), please help me if possible (I am a beginner in NodeJS).

Hi! Sure, please take a look at the following indicator:

https://github.com/cinar/indicatorts/blob/main/src/indicator/trend/communityChannelIndex.ts

There I have defined a defaultXXXXIndicator function that uses the default period, and the actual indicator accepts the period.

If you change the Aroon indicator the same way, please send over a PR and I'll merge it.