Skip to content

dennislwm/pyfxgit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pyfxgit

This is a package of helper classes and libraries.

Author

dennislwm

Installation

$ pip install pyfxgit

Example

from pyfxgit.ChartCls import ChartCls

Getting Data

Note: Variable data is of type DataFrame that consists of columns ['Open', 'High', 'Low', 'Close', 'Dbs', 'DbsMa'].

Add indicator charts

chart = ChartCls(data, intSub=2)
chart.BuildOscillator(1, data['Dbs'], intUpper=3, intLower=-3, strTitle="Dbs")
chart.BuildOscillator(0, data['DbsMa'], intUpper=3.75, intLower=-3.75, strTitle="DbsMa")

Build tags

lstTag = chart.BuildOscillatorTag(data, 'DbsMa', 3.75)

Add spans to main chart

chart.MainAddSpan(data['Tag'], lstTag[lstTag>0], 0.2, 'red')
chart.MainAddSpan(data['Tag'], lstTag[lstTag<0], 0.2, 'green')

Build main chart

chart.BuildMain(strTitle="SPY")

Save chart

chart.save("Dbs")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages