{
EnterShort("Short");
SetProfitTarget("Short", CalculationMode.Price,Position.AvgPrice - (MyShortTarget*TickSize));
SetStopLoss("Short", CalculationMode.Price,Position.AvgPrice + (MyShortStop*TickSize), false);
MyEntryPrice = Close[0];
}
I'm using this with CalculateOnBarClose = false. I have a section of code inside FirstTickOfBar and it will work from within there, but it appears to me that Position.AvgPrice is not assigned a value until the close of the first bar of the trade. Is this correct, or am I possibly doing something else wrong?
Thanks
Safetrading
Comment