Skip to content

Technical indicators: EMA, MACD, DMI, ATRP, etc.

Notifications You must be signed in to change notification settings

ananich/indicators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATR indicator calculation example

Here is an example of calculation of Average True Range indicator using GO lang.

It reads input data from the file specified in the first command line parameter. The file has to be in CSV format. Historical data from Yahoo! Finance can be used for testing purposes. By default output is printed to STDOUT which may be redirected to a file:

go run ./cmd/main.go AAPL.csv > AAPL+ATR.csv

Output contains data in CSV format similar to input plus additional column with calculated ATR indicator.

  • Computational complexity: linear
  • Memory complexity: const

For verification of the calculated indicator there is a Tableau book.

ATR

Releases

No releases published

Packages

No packages published

Languages