This supertrend does not use a multiple of current average true range (ATR) as the distance to median prices. Instead, the distance of the supertrend line to median prices is only a fraction of the current price (close * factor).
In sideward phases, when average prices do not change, this supertrend will stay constant. The “normal” supertrend (using ATR) will reduce its distance to the median price in sideward phases, when volatility and ATR decrease.
This simplified supertrend can give better results in certain cases, for example in long-term charts, when prices show highly different values falling in a very broad range (e.g. DAX prices between 4000 and 13500).
The indicator behaves more like a traditional trailing stop, because volatility is not considered. The risk of curve-fitting and over-optimization is reduced, because only one adaptable parameter (“factor”) is used.
As always, it should be tried out in every single instance by optimizing a simple trading system whether this indicator or the “normal” supertrend work better.
The indicator should be added to the price window by selecting “settings price – add indicator”. You can colour the indicator or change line thickness yourself using the box “settings simplified supertrend”.
ONCE direction = 1
ONCE STlongold = 0
ONCE STshortold = 1000000000000
factor = 0.005
indicator1 = medianprice
indicator3 = close
indicator2 = indicator3 * factor
STlong = indicator1 - indicator2
STshort = indicator1 + indicator2
If direction = 1 and STlong < STlongold then
STlong = STlongold
If direction = -1 and STshort > STshortold then
STshort = STshortold
If direction = 1 and indicator3 < STlong then
direction = -1
If direction = -1 and indicator3 > STshort then
direction = 1
STlongold = STlong
STshortold = STshort
If direction = 1 then
ST = STlong
ST = STshort
Return ST as "simplified Supertrend"
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.ProRealTime ITF files and other attachments :
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Big thanks for sharing this 🙂 Seems to work as expected, good stuff.