Look at the picture for more detail ( in this example there are 2 separated longs of ES at 1237.75 Each bar shows at the top the value of Position.AvgPrice ) with :
DrawText("tx2"+CurrentBar, "B="+Position.AvgPrice , 0, High[0] + 0.50, Color.Blue);
Look that at the second long ( the first one was closed by a trailing Stop Loss ) the AvgPrice is 1237.72302996171 instead of 1237.75

Comment