OrcChieftain

Underworld Hunter Backtesting Algorhitm

This strategy is built to prove the profitability of my Underworld Hunter indicator. It tests two different strategies. I won't be going into the calculation again since it is part of the original script. I just made a few adjustments.

First one is clearly visual. It plots slimmer twin-coloured lines now and has a different colour for every extreme level. Second is less obvious - I switched Relative Strength Index for Commodity Channel Index.

Extreme levels are as follows: green 100 -► 120, yellow 120 -► 140, orange 140 -► 160, red 160 -► 180 and purple above 180, I will have a special separate algorithm for testing optimal CCI levels someday, in this script, these values are only meant to help you with manual operations and do not influence results of the strategy in any way.

#Trending strategy

The trending strategy opens a position whenever the price leaves the bands and holds it until two consecutive bars are closed within the bands. The picture shows one winning position that hasn't yet been resulted. It also shows a few fakeouts. For this strategy, you want to keep the length below 110, the deviation should be below 2 and you probably want to play lower timeframes.


#Within the bands

The second strategy is pretty much the opposite. It opens a position when the price reaches outer bands and holds it until two consecutive bars are closed within the bands and current bar closes below previous bars low in case of long. It is working on hourly timeframes and you need higher length and deviation to succeed. The picture shows a few positions on EURUSD. Each of them is profitable but would be much higher if you closed it manually when it was time. You need to enable this strategy, which automatically disables the other one.


When using my script, you need to bear in mind that the first strategy doesn't detect optimal levels to close the price. A trend is often followed by a less volatile and boring correction which causes bands to shrink and lower your profits if you don't close manually as it will take longer till bands are reached.

On the other hand, second script literally has no stop-loss. As long as the price is outside the range, it will never close which will cause major drawdowns, unless you control the trade manually. CCI is here to help you with both.

I also recommend combining this with Market Profile (on TW, there is only Volume Profile, which can be used in a similar way) and trading day theory (trending with multiple distributions, trending day, normal day, a variation on a normal day, non-trending day or neutral day). Always keep in mind that it is up to traders to be profitable, indicators can support a good trader, but they will not fix a bad one.




开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?