i just started quantconnect here.
i am trying to align data in quantconnect to my live Oanda before proceeding with algorithm.
i found that they are not the same... i read it due to GMT diff but is there a way to align it?
i tried..
startdate = startdate.AddHours(-11);
SetStartDate(startdate);
but looks like setstartdate do not take in hours into consideration
then how do i align it.. or should i use a ( if {timerange} do....; else{null} ) during ondata()?
log here
2020-05-17 00:00:00 Startdate = 5/17/2020 12:00:00 AM
2020-05-17 00:00:00 Enddate = 5/23/2020 12:00:00 AM
2020-05-17 20:00:00 107.21
2020-05-18 20:00:00 107.39
2020-05-19 20:00:00 107.82
2020-05-20 20:00:00 107.59
2020-05-21 20:00:00 107.65
2020-05-22 20:00:00 107.64
Tham1606
for those that one to get exact Oanda forex hour data in QC..
exact Oanda time is printed beside price
log pasted here
2020-05-18 00:00:00 :2020-05-18 11:00:00 107.142020-05-18 01:00:00 :2020-05-18 12:00:00 107.132020-05-18 02:00:00 :2020-05-18 13:00:00 107.162020-05-18 03:00:00 :2020-05-18 14:00:00 107.222020-05-18 04:00:00 :2020-05-18 15:00:00 107.192020-05-18 05:00:00 :2020-05-18 16:00:00 107.292020-05-18 06:00:00 :2020-05-18 17:00:00 107.302020-05-18 07:00:00 :2020-05-18 18:00:00 107.302020-05-18 08:00:00 :2020-05-18 19:00:00 107.282020-05-18 09:00:00 :2020-05-18 20:00:00 107.452020-05-18 10:00:00 :2020-05-18 21:00:00 107.492020-05-18 11:00:00 :2020-05-18 22:00:00 107.422020-05-18 12:00:00 :2020-05-18 23:00:00 107.262020-05-18 13:00:00 :2020-05-19 00:00:00 107.272020-05-18 14:00:00 :2020-05-19 01:00:00 107.342020-05-18 15:00:00 :2020-05-19 02:00:00 107.402020-05-18 16:00:00 :2020-05-19 03:00:00 107.332020-05-18 17:00:00 :2020-05-19 04:00:00 107.312020-05-18 18:00:00 :2020-05-19 05:00:00 107.322020-05-18 19:00:00 :2020-05-19 06:00:00 107.312020-05-18 20:00:00 :2020-05-19 07:00:00 107.392020-05-18 21:00:00 :2020-05-19 08:00:00 107.322020-05-18 22:00:00 :2020-05-19 09:00:00 107.422020-05-18 23:00:00 :2020-05-19 10:00:00 107.422020-05-19 00:00:00 :2020-05-19 11:00:00 107.362020-05-19 01:00:00 :2020-05-19 12:00:00 107.452020-05-19 02:00:00 :2020-05-19 13:00:00 107.392020-05-19 03:00:00 :2020-05-19 14:00:00 107.512020-05-19 04:00:00 :2020-05-19 15:00:00 107.422020-05-19 05:00:00 :2020-05-19 16:00:00 107.472020-05-19 06:00:00 :2020-05-19 17:00:00 107.562020-05-19 07:00:00 :2020-05-19 18:00:00 107.632020-05-19 08:00:00 :2020-05-19 19:00:00 107.742020-05-19 09:00:00 :2020-05-19 20:00:00 107.912020-05-19 10:00:00 :2020-05-19 21:00:00 107.872020-05-19 11:00:00 :2020-05-19 22:00:00 107.942020-05-19 12:00:00 :2020-05-19 23:00:00 107.882020-05-19 13:00:00 :2020-05-20 00:00:00 107.832020-05-19 14:00:00 :2020-05-20 01:00:00 107.802020-05-19 15:00:00 :2020-05-20 02:00:00 107.742020-05-19 16:00:00 :2020-05-20 03:00:00 107.722020-05-19 17:00:00 :2020-05-20 04:00:00 107.702020-05-19 18:00:00 :2020-05-20 05:00:00 107.742020-05-19 19:00:00 :2020-05-20 06:00:00 107.832020-05-19 20:00:00 :2020-05-20 07:00:00 107.822020-05-19 21:00:00 :2020-05-20 08:00:00 107.902020-05-19 22:00:00 :2020-05-20 09:00:00 107.792020-05-19 23:00:00 :2020-05-20 10:00:00 107.762020-05-20 00:00:00 :2020-05-20 11:00:00 107.79
Rahul Chowdhury
Hey Tham,
By default, QCAlgorithm time zone is set to New York's timezone EDT/EST. Since Oanda data is in UTC, you can change the algorithm time zone with:
# In Initialize SetTimeZone("UTC");
I highly recommend completing the bootcamps to learn more about the QuantConnect API and reading the documentation on time to learn more.
Best
Rahul
Tham1606
great thanks... oh ya use SetTimeZone();
but i guess the timing isnt that of a concern when doing backtesting...
just unless you wanted to test and check specifically time window...
btw i have set up VS2019 for quantconnect... i can see the functions and example much better now..
Tham1606
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!