0
votes

I would to know if it is possible to make a more precise backtest by applying a lower timeframe to exit the order.

For example, I have a DAILY timeframe strategy, but exit transactions are done when the bar is closed and sometimes it is confusing when what the first Take-Profit or Stop-Loss is reached.

I tried to applicate a timeframe of one minute to affinate the Stop and Take-Profit trigger but it seems not to start in the same time of the begining of the backtest. I have plot One Minute time frame and it is programming to begin from the current time.

There is a solution to set the begining of 1 minute timeframe at the start date of the backtest ? Maybe through an upgrade of the account ? Pro toward prenium ?

1

1 Answers

0
votes

Your strategy runs on the chart's timeframe, and that resolution dictates the finest amount of detail your strategy can use to generate and process orders on historical bars. You can use security() to access higher timeframe information and use that in your calculations.

When your strategy runs in the realtime bar, then you have the option of enabling order processing at a finer resolution than the chart's resolution, using strategy()'s calc_on_every_tick= parameter, but keep in mind that while that will work for forward testing, your backtesting will not reflect that behavior, as historical bars on TV have only OHLC information.