Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

Latest commit

 

History

History
24 lines (17 loc) · 1.01 KB

readme.md

File metadata and controls

24 lines (17 loc) · 1.01 KB

ichimoku-moving-average Build status npm version codecov

Average of high and low over a lookback period

Install

npm install @strong-roots-capital/ichimoku-moving-average

Use

import IchimokuMovingAverage from '@strong-roots-capital/ichimoku-moving-average'

const tenkan = new IchimokuMovingAverage(9)
const kijun = new IchimokuMovingAverage(26)

for (const value of getValues()) {
    tenkan.push(value)
    kijun.push(value)
    console.log(tenkan.value() > kijun.value() ? 'uptrend' : 'downtrend')
}