Back

Difference Timeframes

Hi,

As I am now learning C# I was wondering if someone could give me some help on trading using different timeframes.

Such as, minute (default), daily, and weekly?

How can I resample the data into these timeframes or access another data object with the specified duration?

Any help will be appreciated.

Thanks,
Andrew
Update Backtest








Hey Andrew! I'd recommend starting with Bob Tabor's learning C# videos -- they'll give you a good foundation. There are other videos on the site as well for more advanced levels.

To build a weekly bar you would need to assemble each bar together for a week. You could use a TimeSpan object (a C# measurement of a period) and then assemble all the bars before the timespan has passed.

Check out the code below -- we assemble minute bars into 10minute bars :) Perhaps this will help.
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


That helps alot! Thanks!
0

@AndrewLeach I know this is an old post but I was wondering: are you interested in collaborating?
0

@JP B To be honest I haven't had time to concentrate on this although it is a longterm plan so can't help at the moment. As and when I get to it I'll write an example though.
0

@AndrewLeach I meant in general: maybe we can partner up?
0

@JP B Thanks but as I said, I really haven't time to be looking at this at the moment but I will consider your offer when I find the time. Thanks again!
0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed