OPEN-SOURCE SCRIPT

Ultimate Trader Oscillator - UTO v1

已更新
Note; this is experimental / learning work -- has nothing to do with the existing "Ultimate Oscillator" -- i call this project UTOpia :)

This is based on some research work i was doing around the Balance Of Power - which i posted about in the past
Indicators: My Issues with BoP: Part #2


the conclusion form there was a questions of, what would we get if we create an indicator that takes into consideration other factors that may be affecting momentum - so while the classic Balance of Power formula looks at where the open and close of a bar are compared to the full bar range, this is only a small part of the insight we need - when we visually inspect a price chart, we also look at many other factors. for example, how the bar closes compared to previous bar(s), how much did the bulls (or bears) managed to move the high (or low) of the bar compared to previous one, how much volume, how is the price spread ...etc

so i wanted to build an indicator that does exactly that - we will give a score of +100 / -100 to each bar based on these factors (some were identified in the linked post) -- imagine here that we are a judge in a tug of war contest (or a beauty contest if you would :)) and we give a score to the participating teams - the scores are given in different "categories" as these teams make effort to win the game (each bar) - to be totally fair, in some scoring categories, we choose to take the average of 3 points for a fair assessment - the final score is calculated based on the average from all judges - and then and average over the desired length is calculated. this score should be very fair and represents the true effort from all angles, right? that would be our UTOPIA :)

in our case, we don't use an average of total score after each category is evaluated, but rather create a directional index (similar to RSI) -- so we can avoid big spikes in the resulting numbers, and maintain a oscillator -like result.

-- the code is commented to explain the various pieces - and how the scoring happen.

the results are interesting - and you can see how the UTO stacks against the classic RSI and BoP - but it's more of a work to build on, rather than a usable indicator - although i do use it in my own trading :)

one final thought here, i came to learn after few years that the best indicators do not necessarily lead to profitable trading. from an indicator standpoint, if everyone else is trading using (for example) a moving average crossover or RSI, then a successful trader should be looking at these classic indicators too, cause these common indicators will drive the mass behavior - and will at many times trigger "self- fulfilling prophesies" in price action - but that's not the only or the biggest reason - the big reasons have to do with the fact that trading needs a lot of effort outside the charts, in researching markets, learning the discipline, then managing positions and managing the portfolio. these are all big topics to put in such short words.

i hope some will find this work inspiring.
版本注释
- used a different technique for scoring of price spread (k5)
- cleaned up the code and added some more comments for clarity
版本注释
here's UTO v2 with some additional updates
- i was still not totally happy with the scoring for Price Spread and Volume Change, so made a change to how these 2 scores are calculated - which caused my to introduce a new "Lookback" length period to act as scoring baseline - by default it is set to 10.

v2 becomes more responsive especially to sudden moves - here's a comparison

快照

- also in v2, both the price spread and volume scoring are off by default. that ensures UTO will work with assets with no volume data without the need to change settings

- there are commented code lines to plot the individual scores if needed
版本注释
Ultimate Trader Oscillator (Project UTOpia - UTO) v3 with few updates that i have accumulated over the past few months:
- Hidden by default: the ability to display individual bar scores (this is useful in estimating possible upcoming moves/swings)
- Hidden by default: display a stochastic of the directional index - to see how is it changing relative to/within the given length (this is useful in picking best position entry and exit points)
- double-smoothed signal line of the main plot: easier visualization of main UTO line changes
- some other code and visualization clean-ups
版本注释
No code changes. Just a quick note that the work on UTO will transition to the new Bar Strength Inspector / Bar Strength Index (BSI)
i will no longer make changes or updates here.

If you use UTO, please pick up the latest version of RedK BSI from the public script library or under my profile - direct link to BSI
thank you.
Balance Of PowerCentered OscillatorsOscillatorsredkRelative Strength Index (RSI)Trend Analysisultimatetraderoscillator

开源脚本

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

想在图表上使用此脚本?

免责声明