Hello Amine and thanks for your answer.
I've looked at your suggestion code and I see a pair problems:
1. The code will return the last tick price that arrives on the first minute of the week. But I need the first tick price!
2. The code has to be running at the beginning of the week to get the price, and if the strategy is stopped in the middle of the week, it can't be used again until the next sunday.
I have another simpler program for that (running since sunday night):
User Variable FirsTick Boolean Initial Value: True
User Variable WeeklyFirstPrice Double
OnTick -> If FirstTick = True -> If LastTickInstrument = DefaultInstrument -> Assign False to FirstTick -> Assign LastTickBid to WeeklyFirstPrice
But it has the same problem: It has to be started on sunday and if it's stopped in the middle of the week you have to wait until next sunday.
I need to get the first price of the week from the first historical candle on sunday night to be able to start running the strategy at any moment during the week.
Cheers
Francisco