Hello,
I am attempting to calculate Camarilla pivot point values based on the previous day candle (open, close, high and low). My issue is regarding the daily candle data being returned to OnData.
My broker is Oanda. and am using a Daily resolution.
AddForex("EURUSD", Resolution.Daily, Market.Oanda);
I setup the following within OnData event handler.
_open = data["EURUSD"].Open;
_close = data["EURUSD"].Close;
The values returned are indicating that the daily candle is based on a 1900(EST) open/close. Two hours after the NY market closes.
Shouldn’t the previous daily candle values reflect a 1700(EST) open/close? This is generally accepted as the official open/close of the forex market and the basis of calculating daily candles.
Is this by design (UTC Midnight) or am I missing something?
I’m just starting my journey with QC and any help would be appreciated.
Thanks,
Jim T
Michael Manus
i would like to join this discussion...
Hi Jared Broad ,
the daily candle is provided to the algo through OnData at the end of the day and not at closing at 4 o'clock new york time. So if i would like to get into a position/stock in the last trading minutes of the day i would have to do that with a scheduled event (BeforeMarketClose).
Is that correct?
Maybe there should be a switch some day to test also algo behaviour when entering an algo at before market closing to prevent this OnMarketOpen - Orders when the algo gets his daily bar.
:)
Jared Broad
OANDA data is served to us and stored in GMT; FXCM is served and stored in EST. If you'd like another variant of this you can use Consolidators to build the time-zoned bars you'd prefer. (e.g. add 24-count bars together to get the "day" that works for you).
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.
J Thomas
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!