Trendlyne applies the First-In-First-Out (FIFO) method to calculate your average buy price when you execute multiple buy and sell transactions. This method assumes that the earliest purchased shares (first in) are sold first. The average buy price is then recalculated based on the cost of the remaining shares (the ones bought later). This approach ensures a systematic and consistent calculation of your average buy price after each sell transaction.

For better understanding, please refer to the sample calculation sheet below, which demonstrates this concept with detailed examples. This resource is designed to help you understand how your average buy price adjusts with each sale.