OPEN-SOURCE SCRIPT
Weighted Average Entry (Nearest 0.25)

“If I add more contracts here, how much does it actually improve my position — and how much additional risk am I taking?”
This tool was designed to answer that exact question.
When traders are already inside a position and begin scaling in with additional entries, the average position price changes depending on:
* where the new entry is placed
* how many contracts are added
* the size of the existing position
Most traders understand that adding another entry changes the average price, but many do not fully understand how much their position actually improves compared to how much additional exposure and risk they are taking on.
This tool automatically calculates the weighted average entry price of a position using multiple contract sizes and multiple entry prices. It allows traders to instantly see how every new scale-in affects:
* the true average entry
* the breakeven level
* the distance to stop loss
* unrealized drawdown
* overall position exposure
* risk-to-reward efficiency
The primary purpose of the tool is risk management while already inside a trade.
For example:
a trader may already be short from a higher level and decide to add another short position lower in price. The additional entry may improve the average position price, but it may also increase overall risk significantly depending on the size added and the distance to the stop loss.
The tool helps traders visualize how far their position “slips” as more contracts are added and whether the improvement in average price is actually worth the increase in exposure.
Instead of manually calculating averages and contract weighting, the script instantly updates the true average position price directly on the chart.
This makes it especially useful for:
* futures trading
* ICT-style scaling entries
* laddering into Fair Value Gaps (FVGs)
* pyramiding positions
* execution-based trading models
* ES and NQ contract management
In simple terms, the tool helps traders make smarter decisions about scaling into positions by showing whether an additional entry genuinely improves the trade or simply increases risk without meaningful benefit.
This tool was designed to answer that exact question.
When traders are already inside a position and begin scaling in with additional entries, the average position price changes depending on:
* where the new entry is placed
* how many contracts are added
* the size of the existing position
Most traders understand that adding another entry changes the average price, but many do not fully understand how much their position actually improves compared to how much additional exposure and risk they are taking on.
This tool automatically calculates the weighted average entry price of a position using multiple contract sizes and multiple entry prices. It allows traders to instantly see how every new scale-in affects:
* the true average entry
* the breakeven level
* the distance to stop loss
* unrealized drawdown
* overall position exposure
* risk-to-reward efficiency
The primary purpose of the tool is risk management while already inside a trade.
For example:
a trader may already be short from a higher level and decide to add another short position lower in price. The additional entry may improve the average position price, but it may also increase overall risk significantly depending on the size added and the distance to the stop loss.
The tool helps traders visualize how far their position “slips” as more contracts are added and whether the improvement in average price is actually worth the increase in exposure.
Instead of manually calculating averages and contract weighting, the script instantly updates the true average position price directly on the chart.
This makes it especially useful for:
* futures trading
* ICT-style scaling entries
* laddering into Fair Value Gaps (FVGs)
* pyramiding positions
* execution-based trading models
* ES and NQ contract management
In simple terms, the tool helps traders make smarter decisions about scaling into positions by showing whether an additional entry genuinely improves the trade or simply increases risk without meaningful benefit.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.