Topics
Replies
PanagiotisCharalampous
11 Jul 2022, 15:14
Hi there,
I ran the cBot but I do not see any problem with SL. The fact that you set the SL at 0.8 does not mean it will execute exaclty there. The SL is triggered when the loss is equal or higher than the set price. Actual execution depends on market prices. Also you need to note that SL for sell orders is triggered by ask prices. Candles are drawn by bid prices.
Regarding the TP, it seems your logic is buggy. There are sections of the code that do not allow the TP to execute but I don't know what are they supposed to do. You need to debug the logic of the cBot yourself
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jul 2022, 14:04
Hi there,
Please share the exact FIX messages exchanged so that we can advise further.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jul 2022, 13:57
Hi jordangail,
You need to contact your broker to investigate further.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 15:57
Hi jordangail,
No, this is not a bug, it works like this by design. If you submit invalid stop losses that cannot be placed, then you need to decide what happens next.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 14:31
Hi there,
You also need to provide me with examples from backtesting where the SL and TP do not execute correctly. I need to be able to see the symbol and broker as well.
Also make sure you are testing using tick data.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 12:01
Hi there,
Here you go
protected override void OnStart()
{
drawSupport(Bars.Skip(Math.Max(0, Bars.Count() - 5)));
}
public void drawSupport(IEnumerable<Bar> previousBars)
{
}
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:56
Hi khoshroomahdi,
You need to be more specific regarding what is not working.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:52
Hi there,
Check this tool, you will find it helpful.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:50
Hi there,
Please provide the complete cBot code and steps to reproduce this behavior.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:48
Hi facuhadar,
I replied to your email.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:45
Hi Paul,
Can you share the complete code that reproduces this behavior?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:43
Hi Clovito,
You need to contact your broker regarding this matter.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:42
Hi colymaxa,
There is no such option at the moment in the API. You will need to filter the results on your side.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:40
Hi jordangail,
This can happen when the SL is moved within the spread. In this case, the price is invalid and the SL cannot be set, leaving your position exposed.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:36
Hi there,
cTrader will only load the necessary data once.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2022, 11:27
Hi strakmi,
Any chance you can record a video demonstrating all this so that I can forward it to the product team to check?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
07 Jul 2022, 12:44
Hi strakmi,
Can you share your cBot code and exact steps that reproduce the problem?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
07 Jul 2022, 08:28
Hi Alfie,
You can try something like this
if (Server.Time.DayOfWeek == System.DayOfWeek.Friday && Server.Time.TimeOfDay > TimeSpan.ParseExact("21:00", "hh\\:mm", null))
{
foreach (var position in Positions)
position.Close();
}
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
06 Jul 2022, 15:42
Hi Florent,
You don't need to reinstall Windows, just cTrader. Let me know what happens.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jul 2022, 15:17
Hi there,
You can read how to debug cBots here.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous