1. I'm coding a custom optimizer.cs but have hit a snag. I want to assign weights to profits and losses according to when those profits/losses occured, the most recent peformance having the most weight, much in the way an EMA is calculated for a price series.
I therefore need to reference trades to dates (I only need to calculate results per day for now) to identify trade exits on the last day of the optimization window and -1 days back repeatedly from there to the opening day of the window.
It looks like the OptimizationType class only deals with trades in totallity - can they be split by day and if so how best to approach the coding?
2. I've a second issue related to WFO which I can not find a solution for on the forums although I've seen the issued raised - How to have a test period of exactly one day? I have already created a custom session template which starts at 00:01 and finishes at 23:59 and have used that to successfully optimised for only those dates within the optimization window. But no trades are ever recorded using the same session template with test period set to 1 day, although trades do appear on these dates when the test window is set to 2 or more days.
Grateful of course for any feedback.
Many thanks in advance
Comment