OPEN-SOURCE SCRIPT
Telah dikemas kini Rebalance as a Bear/Bull indicator

Check if the current market has a Bear tendency or a Bull tendency.
Bear areas are marked as red squares going down from 0.
Bull areas are marked as green squares going up from 0.
Buying/Selling windows of opportunity
On top of the Bear/Bull squares, this indicator tries to show you the windows where to look for good buying/selling opportunities.
These are marked as full columns:
How is this possible?
This is an indicator of a simple idea to check if the market has a Bear or Bull tendency:
1. Start with a virtual portfolio of 60/40 tokens per fiat.
2. Rebalance it when its ratio oscillates by a given % (first input)
3. Count the number of times the rebalancer buys, and sells
4. When the number of buys is greater than the number of sells => the market is going down
5. When the number of sells is greater than the number of buys => the market is going up
This is shown as the "Bear/Bull Strength" squares (red when bear, green when bull)
An extra rebalancer is also kept that works at each bar (regardless of the input %).
This is used to calculate an amount of tokens beying sold/bought and used as a "market force" coefficient.
Another extra: based on both the bear/bull strengh and market force an attempt is made to
provide good buying/selling windows of analysis.
The blue background is a buying opportunity, the red background is a sell opportunity.
In a bear market sales are delayed, and in a bull market buys are delayed.
Bear areas are marked as red squares going down from 0.
Bull areas are marked as green squares going up from 0.
Buying/Selling windows of opportunity
On top of the Bear/Bull squares, this indicator tries to show you the windows where to look for good buying/selling opportunities.
These are marked as full columns:
- Blue columns represent a window to look out for good buying opportunities
- Pink columns represent a window to look out for good selling opportunities
How is this possible?
This is an indicator of a simple idea to check if the market has a Bear or Bull tendency:
1. Start with a virtual portfolio of 60/40 tokens per fiat.
2. Rebalance it when its ratio oscillates by a given % (first input)
3. Count the number of times the rebalancer buys, and sells
4. When the number of buys is greater than the number of sells => the market is going down
5. When the number of sells is greater than the number of buys => the market is going up
This is shown as the "Bear/Bull Strength" squares (red when bear, green when bull)
An extra rebalancer is also kept that works at each bar (regardless of the input %).
This is used to calculate an amount of tokens beying sold/bought and used as a "market force" coefficient.
Another extra: based on both the bear/bull strengh and market force an attempt is made to
provide good buying/selling windows of analysis.
The blue background is a buying opportunity, the red background is a sell opportunity.
In a bear market sales are delayed, and in a bull market buys are delayed.
Nota Keluaran
Added a small comment to the code with a link to find the the public libraries that it usesNota Keluaran
Propagate the window of opportunity with the candle closeSkrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.