I submit order at ThreeMinuteBarHandler() and algo time is 5/6/2014 11:57:00 PM
but in OnOrderEvent(OrderEvent orderEvent) the algo time is 5/7/2014 12:00:00 AM
it seems it take 3 mintues to my order get submitted but if I place my order in OnData() then the order will get submitted exatly at 5/6/2014 11:57:00 PM
would you please help on the issue
public override void Initialize()
{
SetStartDate(2014, 5, 7); //Set Start Date
SetEndDate(2014, 5, 15); //Set End Date
AddForex("EURUSD", Resolution.Minute, Market.FXCM);
var s = Symbol("EURUSD");
Consolidate(s, TimeSpan.FromMinutes(3), ThreeMinuteBarHandler);
}
void ThreeMinuteBarHandler(QuoteBar consolidated)
{
if (a)
{
return;
}
a = true;
Log("Time:" + consolidated.Time);
Log("Algo Time:" + consolidated.Time);
var s = Symbol("EURUSD");
LimitOrder(s, 1000, consolidated.Ask.Open);
}
private bool a = false;
public override void OnOrderEvent(OrderEvent orderEvent)
{
var order = Transactions.GetOrderById(orderEvent.OrderId);
Log($"Algo time {this.Time} - {orderEvent.Status.ToString()}");
}
Jared Broad
Hi there! Please complete Boot Camp to answer this question =)
Best
Jared
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.
Mohammad Abdellahi Neisiani
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!