New Breed of Technical Indicators — Orange
Discussing a New Technical Indicator and Coding it in TradingView
This article discusses one of the indicators of a set called the Rainbow Indicators which are structured and unique combinations of price-derived techniques aimed to help the trader predict reversals or to confirm the on-going trend. The indicator discussed is called the Orange indicator, a contrarian method based on the concept extreme duration.
For a detailed and thorough collection of trend following trading strategies, you can check out my book. The book features a huge number of classic and modern techniques as it dwelves into the realm of technical analysis with different trading strategies. The book comes with its own GitHub.
Trend Following Strategies in Python: How to Use Indicators to Follow the Trend.
Amazon.com: Trend Following Strategies in Python: How to Use Indicators to Follow the Trend.: 9798756939620: Kaabar…amzn.to
Creating the Orange Indicator
Technical indicators may spend time oversold or overbought. Most of the time, they will spend at least five periods before returning to normality. The concept of extreme duration is to try to identify instances where a reversal may occur.
The Orange indicator is a 5-period RSI with an oversold level at 30 and an overbought level at 70. It is used as follows:
A bullish signal is generated whenever the 5-period RSI spends at least five periods below 30 before resurfacing. The low of the resurface candlestick must be below the low of the previous candlestick.
A bearish signal is generated whenever the 5-period RSI spends at least five periods above 70 before breaking it. The high of the resurface candlestick must be higher than the low of the previous candlestick.
For simplicity, the indicators of the Rainbow collection are charted in an overlay arrow-based technique where only confirmed signals are shown (as opposed to showing the indicator on its own).
Coding the Orange Indicator
Pine Script is TradingView’s main coding language which is very user-friendly. We will code this indicator and check out its signals. The next Figure shows the with the signals generated from the indicator.
//@version=5 indicator(title = "Rainbow Collection - Orange", format = format.price, precision = 2, overlay = true) rsi = ta.rsi(close, 5) buy = rsi > 30 and low < low and rsi < 30 and rsi < 30 and rsi < 30 and rsi < 30 and rsi < 30 sell = rsi < 70 and high > high and rsi > 70 and rsi > 70 and rsi > 70 and rsi > 70 and rsi > 70 plotshape(buy, style = shape.triangleup, color = color.orange, location = location.belowbar, size = size.small) plotshape(sell, style = shape.triangledown, color = color.orange, location = location.abovebar, size = size.small)
If you want to see how to create all sorts of algorithms yourself, feel free to check out Lumiwealth. From algorithmic trading to blockchain and machine learning, they have hands-on detailed courses that I highly recommend.
Learn Algorithmic Trading with Python Lumiwealth
Learn how to create your own trading algorithms for stocks, options, crypto and more from the experts at Lumiwealth. Click to learn more
To sum up, what I am trying to do is to simply contribute to the world of objective technical analysis which is promoting more transparent techniques and strategies that need to be back-tested before being implemented. This way, technical analysis will get rid of the bad reputation of being subjective and scientifically unfounded.
I recommend you always follow the the below steps whenever you come across a trading technique or strategy:
Have a critical mindset and get rid of any emotions.
Back-test it using real life simulation and conditions.
If you find potential, try optimizing it and running a forward test.
Always include transaction costs and any slippage simulation in your tests.
Always include risk management and position sizing in your tests.
Finally, even after making sure of the above, stay careful and monitor the strategy because market dynamics may shift and make the strategy unprofitable.