TradingView
TheGrindToday
18 มิถุนา 2021 เวลา 10 นาฬิกา 2 นาที

BTC Dominance & Counter-Trend Indicator 

Dogecoin / US DollarBinance

คำอธิบาย

This script looks at BTC dominance in price-action and scores it (out of the last 100 closed bars). Essentially this looks at the price action of the current security/crypto and tracks whether it traded in-trend with BTC or against the trend with BTC to show when BTC is most prominently dominating.

Currently the code is restricted to the previous 100 trades prior to the bar (you can change this) but only because, for whatever reason, pine scripting doesn't actually allow you to calculate the number of bars currently in the view (lots of people asking for this via StackOverflow but no response yet). Essentially every bar shows the number of trades out of the last 100 that traded in-synch with BTC, the lower the number, the less dominant BTC has been against that security.



Green highlight means it traded positive (upwards) against BTC going down, and red means it traded negative against BTC going up.
ความคิดเห็น
PineCoders
The reason why scripts have no visibility on the number of chart bars is that, for now, it cannot be done.
TheGrindToday
@PineCoders, would be nice consideration for future additions. Even just knowing the left and right time indexes and using the resolution would work. But couldn't figure out if that was possible either
เพิ่มเติม