Topics
Replies
PanagiotisCharalampous
11 Jun 2020, 12:06
( Updated at: 21 Dec 2023, 09:22 )
Hi aaronlandonal301,
This happens because you have the option below selected
If you uncheck it, you should not experience this behavior anymore.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 11:59
Hi orsica,
The problem is that you do not use the correct indices. See below how to code this properly
Bars eurUsd_series;
Bars eurGbp_series;
protected override void Initialize()
{
eurUsdTSI = CreateDataSeries();
eurGbpTSI = CreateDataSeries();
eurUsd_series = MarketData.GetBars(TimeFrame.Hour, "EURUSD");
eurGbp_series = MarketData.GetBars(TimeFrame.Hour, "EURGBP");
eurUsdtsi_ind = Indicators.GetIndicator<TSI>(eurUsd_series.ClosePrices, ShortPeriod, LongPeriod, MaType);
eurGbptsi_ind = Indicators.GetIndicator<TSI>(eurGbp_series.ClosePrices, ShortPeriod, LongPeriod, MaType);
}
public override void Calculate(int index)
{
if (index < 1)
{
eurUsdTsi[index] = 0;
eurGbpTsi[index] = 0;
return;
}
eurUsdTSI[index] = eurUsdtsi_ind.Tsi[eurUsd_series.OpenTimes.GetIndexByTime(Bars.OpenTimes[index])];
eurGbpTSI[index] = eurGbptsi_ind.Tsi[eurGbp_series.OpenTimes.GetIndexByTime(Bars.OpenTimes[index])];
eurUsdTsi[index] = eurUsdTSI[index];
eurGbpTsi[index] = eurGbpTSI[index];
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 08:58
Hi Alex,
Shares are supported in cTrader and many brokers offer shares in their cTrader platforms.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 08:53
Hi giuseppealessiof,
The reasons that can cause a cBot to stop in backtesting are
1) You manually stop it pressing the Stop button
2) You call the Stop() somewhere in your code
3) An exception occurs.
4) Your account reaches 0 equity.
Points 3 and 4 are obvious from the log and chart respectively. If it is point 1 then you should know about it else check if point 2 is a valid reason anywhere in your code.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 08:49
Hi Noppanon,
You need to check your email configuration in case something changed.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 08:47
Hi Sebastian,
If they are still there, it means that the broker did not delete them. You need to talk to your broker to delete them from cTrader.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 08:44
Hi MZen,
I updated the code on GitHub accordingly. You can take the latest version.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 08:33
Hi iucpxleps,
When you partially close the position, your flag will be set to true meaning that if you check if the flag is false before the partial closing, the partial closing will only run once. Then it will wait until the MAs cross on the opposite side before resetting to false and allow the partial closing to be executed again.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 08:30
Hi Lisa,
There is no built-in feature to do this, you need to somehow code this inside your cBot's logic.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 16:26
Hi MZen,
You can remove it and I will update the code soon.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 15:49
Hi Ilia,
Yes, you can read more about stop limit orders here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 14:51
Hi Ilia,
Yes you can use stop limit orders to minimize slippage. You can use market range orders as well.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 14:34
Hi Ilia,
I am not sure what do you need to confirm.You have repeated the same question I have replied too. Did you try visual backtesting? If you try it, your questions will be answered.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 12:16
Hi,
Yes you can.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 11:34
Hi,
You cannot simulate slippage in cTrader either since market depth information is not available in backtesting.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 11:31
Hi Yuval,
No there is no such option.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 10:51
Hi ctraderftmo+115,
You can always consider assigning a job to a professional to develop a performance efficient indicator for you.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 10:30
Hi Yuval,
Check ObjectSelectionChanged event.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2020, 10:18
Hi ctraderftmo+115,
If you are running custom indicators then you will need to check this with the indicator developers. If the indicators have not been programmed efficiently then you might end up with performance issues.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2020, 12:44 ( Updated at: 21 Dec 2023, 09:22 )
Hi Noppanon,
It works fine for us.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous