Giter Site home page Giter Site logo

stock-technical-indicators's Introduction

⛳️ Stock-Technical-Indicator

🚦 Calculate Average True Range (ATR)

ATR Sample Data

https://gist.github.com/zural/2e181ab0cbb3525d121ce4a4c6a28aa8

RunKit: https://runkit.com/zural/stock-indicator-study-atr

const SampleData = require('SampleData);
const { Indicator } = require('../../study/index');

const { ATR } = require('../../study/ATR');
const newStudyATR = new Indicator(new ATR());
console.log(newStudyATR.calculate(ATR_DATA));

Output
 [ ...
 	TrueRange: 26.75, 
 	SumTrueRange: 125.5999999999998,
	Value: 19.44443831563074
]


🔃 Calculate Supertrend

Up trend is indicated as Direction: 1 Downtrend is indicated as Direction: -1

Supertrend Sample Data

https://gist.github.com/zural/2e181ab0cbb3525d121ce4a4c6a28aa8

RunKit: https://runkit.com/zural/stock-indicator-study-supertrend

const SampleData = require('SampleData);
const { Indicator } = require('../../study/index');

const { Supertrend } = require('../../study/Supertrend');
const newStudySuperTrend = new Indicator(new Supertrend());
const calculateSupertrend = newStudySuperTrend.calculate(ATR_DATA, { period: 7, multiplier: 3 });
console.log(calculateSupertrend);

Output:
[
	Direction: 1,
	Up: 651.0916850531078,
	Down: 706.9636508963451,
	ActiveTrend: 651.0916850531078
]

Social Connect https://www.linkedin.com/in/shivawebdeveloper/

Contribute https://github.com/zural/stock-technical-indicators

stock-technical-indicators's People

Contributors

sivaraj-v avatar

Stargazers

Dooee avatar Brittik Basu avatar jeremy-rafflin avatar ChinChin avatar Suman Kumar avatar

stock-technical-indicators's Issues

Supertrend date

Can you uncompile this somehow ? I'm trying to get the timestamp into the SuperTrend object .

Actually what is the result of this function, is it grouped into periods after I calculate it ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.