Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
301 views
in Technique[技术] by (71.8m points)

date range - Pine Editor backtesting not working on lower time frame charts

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!

question from:https://stackoverflow.com/questions/65916806/pine-editor-backtesting-not-working-on-lower-time-frame-charts

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...