How to get Historical data for backtesting
How to get Historical data for backtesting
16 Aug 2018, 16:42
Hi,
Im back testing my custom renko however i would like that if im backtesting say between 5/5/2018- 5/8/2018, then I would like to use data from say 5/4/2018, one month in advance to create renko.
thank you
Replies
ctid386599
16 Aug 2018, 21:43
RE:
Hi Panagiotis,
I have renko indicator and a cbot gets the renko blocks.
If i want to run my bot between a given time interval, the blocks are formed between that time interval.
it means at time =0, there is no brick yet. I would like to have bricks from say 1 month earlier
@ctid386599
PanagiotisCharalampous
17 Aug 2018, 09:40
Hi ctid386599,
Data for indicators is loaded for periods before the backtesting starts therefore you should not worry about this. You should havemany bricks created on starting your cBot. See example below.
using cAlgo.API; using cAlgo.Indicators; using cAlgo.API.Indicators; using System.Linq; using System; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewcBot : Robot { private Renko _renko; protected override void OnStart() { _renko = Indicators.GetIndicator<Renko>(10, 100, 3, "SeaGreen", "Tomato"); Print(_renko.Close.Count); } protected override void OnBar() { } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Aug 2018, 16:50
Hi ctid386599,
It is not clear to us what do you need.
If you give us some more information on what you are trying to do then we might be able to help you.
Best Regards,
Panagiotis
@PanagiotisCharalampous