Support Resistance Algorithm - Technical analysis

后端 未结 11 503
悲哀的现实
悲哀的现实 2020-12-12 09:23

I have an intra-day chart and I am trying to figure out how to calculate support and resistance levels, anyone knows an algorithm for doing that, or a good starting point?

11条回答
  •  醉梦人生
    2020-12-12 09:41

    I put together a package that implements support and resistance trendlines like what you're asking about. Here are a few examples of some examples:

    import numpy as np
    import pandas.io.data as pd
    from matplotlib.pyplot import *
    gentrends('fb', window = 1.0/3.0)
    

    Output

    That example just pulls the adjusted close prices, but if you have intraday data already loaded in you can also feed it raw data as a numpy array and it will implement the same algorithm on that data as it would if you just fed it a ticker symbol.

    Not sure if this is exactly what you were looking for but hopefully this helps get you started. The code and some more explanation can be found on the GitHub page where I have it hosted: https://github.com/dysonance/Trendy

提交回复
热议问题