Topics
Replies
akudzmanas
26 Aug 2021, 19:19
RE:
PanagiotisCharalampous said:
Hi akudzmanas,
This issue has not been fixed yet.
Best Regards,
Panagiotis
Thank you for your prompt reply.
Should I take it, this will not be fixed anytime soon or at all, sir ?
@akudzmanas
akudzmanas
26 Aug 2021, 08:14
RE:
PanagiotisCharalampous said:
Hi office3131,
It seems you are using an indicator that uses data from other timeframes. There is an issue in optimization for such cases. It will be resolved in a future update.
Best Regards,
Panagiotis
I am using a Cbot which uses some data drawn from Weekly TimeFrame to then use it for trades in Hourly 1h chart.
I suspect I might be having the issue you mentioned, could somebody confirm this has been fixed ?
protected override void OnBar()
{
//OnBar last week high low array updater
Bars series = MarketData.GetBars(TimeFrame.Weekly);
double lastWeeekHigh = series.HighPrices[series.Count - 2];
double lastWeeekLow = series.LowPrices[series.Count - 2];
weekHighLow[0] = lastWeeekHigh;
weekHighLow[1] = lastWeeekLow;
//Curent week number
currentServerDateTime = Server.Time;
weekNumber = calendar.GetWeekOfYear(currentServerDateTime, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
cancelOrdersEndOfWeek();
}
protected override void OnTick()
{
// Order placement logic
var totalOrders = PendingOrders.Count;//Int totalPositions = Positions.Count; I used this to limit trades based on open position count
if (totalOrders == 0 && weeklyTradeCount != weekNumber)
{
stopOrderSell();
stopOrderBuy();
}
}
protected void stopOrderSell()
{
//
if (secretMethodName > weekHighLow[0])
{
PlaceStopOrder(TradeType.Sell, SymbolName, inputVolume, secretNumber() - entryOffset * Symbol.PipSize, "Sell", StopLossPips, TakeProfitPips);
Print("Sell" + Server.Time);
weeklyTradeCount = weekNumber;
}
else
return;
}
@akudzmanas
akudzmanas
27 Sep 2021, 19:22 ( Updated at: 27 Sep 2021, 19:55 )
Before anything, may I ask what does the client do after it has reached the end date of backtest ?
Could I contact you privately regarding the info Sir ? I do not wish to put the details out publicly here.
@akudzmanas