TradingView
AlphaViz
20 sept. 2023 10:28

Position Cost Distributionย 

Alphabet Inc.NASDAQ

Description

โ‹…
The Position Cost Distribution indicator (also known as the Market Position Overview, Chip Distribution, or CYQ Algorithm) provides an estimate of how shares are distributed across different price levels. Visually, it resembles the Volume Profile indicator, though they rely on distinct computational approaches.

๐ŸŸ  Principle

The Position Cost Distribution algorithm is based on the principle that a security's total shares outstanding usually remains constant, except under conditions like stock splits, reverse splits, or new share issuance. It views all trading activity as simply exchanging share positions between holders at different price points.

By analyzing daily trade volume and the prior day's distribution, the algorithm infers the resulting share distribution after each day. By tracking these inferred transpositions over time, the indicator builds up an aggregate view of the estimated share concentration at each price level. This provides insights into potential buying and selling pressure zones that could form support or resistance areas.

Together with the Volume Profile, the Position Cost Distribution gives traders multiple lenses for examining market structure from both a volume and positional standpoint. Both can help identify meaningful technical price levels.

๐ŸŸ  Algorithm

The algorithm initializes by allocating all shares to the price range encompassed by the first bar displayed on the chart. Preferably, the chart window should include the stock's IPO date, allowing the model to distribute shares specifically to the IPO price.

For subsequent trading sessions, the indicator performs the following calculations:

1. The daily turnover ratio is calculated by dividing the bar's trading volume by total outstanding shares.
2. For each price level (bucket), the number of shares is reduced by the turnover amount to represent shares transferring from existing holders.
3. The bar's total volume is then added to buckets corresponding to that period's price range.

Currently, the model assumes each share has an equal probability of being exchanged, regardless of how long ago it was acquired or at what price. Potential optimizations could incorporate factors like making shares held longer face a smaller chance of transfer compared to more recently purchased shares.

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

ไธญๆ–‡ไป‹็ป๏ผš่ฏฅๆŒ‡ๆ ‡ไธบโ€œ็ญน็ ๅˆ†ๅธƒโ€็š„ไธ€ไธช TradingView ๅฎž็Žฐ :)
Commentaires
PineCoders
โ‹…
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!
AlphaViz
โ‹…
@PineCoders, Thank you for the recognition! Grateful to be a part of this amazing community :)
selene100
โ‹…
It cannot run now. Can you check and fix it if there is a problem?
Pratik_4Clover
โ‹…
Fantastic!
nucapadvisoryservices
โ‹…
Fantastic!! Looking forward to a index version!!
Bistouche
โ‹…
Hello, thanks for this indicator ! I have a problem, i don't see it display when, could you tell me why ? Thank you
AlphaViz
โ‹…
@Bistouche, Hi, could you let me know which ticker and timeframe you're looking at? Note that since this indicator needs to get the total number of shares as part of its calculation, therefore, it only supports stocks, and does NOT support other securities like futures, index, and cryptos. Thanks.
gooselap7
โ‹…
@algotraderdev, only for stocks๐Ÿ˜ญ
PineCoders
โ‹…
This publication is now featured in our Editors' Picks: tradingview.com/scripts/editors-picks/
Plus