0
votes

I am trying to backtest a simple strategy on trading view with pine editor. I want my strategy to run on the 15M time frame for a specific period in time (the back testing period).

I have inserted the following time-related code into my script:

start = timestamp(2010,1,1,0,0),

end = timestamp(2020,12,31,0,0)

if time >= start and time <= end

(strategy entered in here)

When I add the code to the daily chart the backtesting results are run for my selected backtest period (2010 -2020), however, when I run the same code on any lower time frame it returns fewer results and runs for "random period of time. For example, when I run it on the 15M timeframe it returns results from 1 Sept 2020 - 30 Dec 2020 only and not the full backtest period.

Can anyone tell me what I am doing wrong and advise what code I need to be able to get the full results on a lower time frame from 2010 - 2020 for example.

Thanks so much!

1

1 Answers

0
votes

There are bars limit in the TradingView: Historical bars available: 5K - NonPro, 10K - Pro, 20K - Premium (https://www.tradingview.com/gopro/#compare) Therefore 15min chart starts from Sept 2020