1 min read

Auto Support Resistance Lines in Forex

Automating your trading strategies one Python script at a time
Auto Support Resistance Lines in Forex
Photo by Austin Distel / Unsplash

On the heels of my last post, I've extended those functions to the EURUSD pair. The data starts from this year 2019 and goes through to yesterday. It's a pretty neat script as it takes data from Onada and then generates the support and resistance lines for that particular pair. The next step would be to create a buy/sell order in the Oanda Practice Account. Once I do that it's then a matter of writing a trading strategy and testing it in real time.


Everything I'm doing is completely academic and modular right now. I have no idea how build a Forex Trading Bot or even what strategies to use here. It's more of a "can I do it" endeavor.


I'm fully convinced that retail traders who can learn Python can automate their entire trading strategies. Now, the flipside here is if their strategies are worth anything. Just because we can automate trading setups, we must always ask "Why do I think I'm right?"

Auto generated support and resistance lines, (c) neuralmarkettrends.co


Update


This method has been pretty successful for me in automatically eyeballing support and resistance lines for various currency pairs. I built on top of Hootnot's great Python API integration and some generous chap that created the basic function for detecting maximums and minimums in a time series. I found that code on the Internet somewhere and adapted it to what I needed.


The first incarnation of this charting system used Matplotlib but I soon ported this over to Bokeh and later Plotly. Feel free to take a look at my Githubat and ask me any questions that you might have!