the title of this thread is pretty much self-explanatory: instead of determine the first and last date of timeseries data from Strategy Analyzer --> TimeFrame -->From..To or Data Series window, I'd like to set it manually via code.
Within a strategy I set variables that hold the starting and ending date, I put them in a global "IF" statement before running anything else but although when I print out "ToDay(Time[0])" I get the right "From..To" timeframe dates, my indicators that I call INSIDE this IF statement, seem to disobey and they run for the whole timeseries timeframe.
The idea is to perform multiple backtests (within a for loop) by calling indicators for let's say 3 months by changing their input parameters, and then run the strategy for let's say 1 month with optimal parameters coming from the 3 months period. I have done that but it works only when Session Template From..To coincides with the starting and ending dates variables within the code.
Thank you for your patience to read this!
I would appreciate any feedback.
Comment