Hi Pier,
Because we use a Scheduled Event that executes once per day, it is very similar to being on a Daily Resolution, the only difference being the close value used for the computation uses the price 10 minutes before Market Close as opposed to the price at Market Close.
Please note the solution will not use a LEAN indicator, and other indicators using similar data will be more difficult to implement.
To achieve “the average on the last 19 close plus the latest 10 min to close value and do this everyday”, we can use a RollingWindow of the past 19 market closing prices, sum these prices, then add on the price 10 minutes before Market Close of the current day, then divide the result by 20. I’ve shown how to do this in the attached backtest.
Best,
Shile Wen