Topics
Replies
PanagiotisCharalampous
26 Feb 2018, 10:26
Hi everybody,
This might happen during weekends when cTrader is in maintenance mode.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Feb 2018, 10:41
Hi jamesricketts24,
Thanks for posting in our forum. We have replied officially regarding this issue in this post.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Feb 2018, 13:02
Hi irmscher9,
Stop Loss is executed as a market order. Therefore slippage is expected, especially when a market is crashing against you. Practically there isn't anything you can do. You cannot sell an asset at a price you want if there is nobody willing to buy it at that price.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
21 Feb 2018, 10:33
Hi tmc,
This has been fixed and will be released with the next update.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Feb 2018, 17:00
Hi irmscher9,
It seems there is an issue with historical data for the specific day. We will fix it and inform you. In the meanwhile, you can continue backtesting using Spotware cAlgo.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Feb 2018, 12:48
( Updated at: 21 Dec 2023, 09:20 )
Hi Alexander,
You can disable the respective email alerts. See below
Let me know if this helps,
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Feb 2018, 12:09
Hi irmscher9,
I tried to reprocude with the given code but could not. Can you post the complete cBot as well as backtesting parameters so that we can reproduce it as well?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Feb 2018, 11:53
Hi Drummond360,
You might consider something like the below
protected override void OnStart() { Positions.Closed += OnPositionsClosed; } void OnPositionsClosed(PositionClosedEventArgs obj) { if (obj.Position.NetProfit < 0) { foreach (var position in Positions) { ClosePosition(position); } } }
However note that the code above does not guarantee that the position has been closed by a stop loss. It could be a manual close as well.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Feb 2018, 11:42
Hi Medjan,
We can change the historical data if the broker requests it. If they said that they contacted us, then probably this is sorted out between them and our support team.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Feb 2018, 11:41
Hi Alexander,
You can find a nice guide on how create a custom indicator here. I can provide answers to specific questions, however I cannot guide you step by step on how to create your indicator or teach you C#. If you need professional assistance, you can contact a professional Consultant or post a Job. My role in the community is to help developers with API specific questions.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Feb 2018, 11:23
Hi Alexander,
If you want to visualize you can consider creating a custom Indicator.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Feb 2018, 11:12
Hi Alexander,
Try something like this
var source = MarketData.GetSeries(TimeFrame.Minute15).High; var _bb = Indicators.BollingerBands(source, 20, 2, MovingAverageType.Exponential);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Feb 2018, 09:30
Hi DelTrader,
Thanks but probably this is not enough, As I said, it seems that your condition is never fulfilled. In order to understand why the condition is not fullfiled, we will need to know what values do the different variables have at the time when this line of code is reached. So the only way to do this is to actually debug the cBot. This means that we will need the full source code as well as the execution parameters (Symbol, timeframe etc). If you don't want to expose your cBot publicly, you can contact me at community@spotware.com.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Feb 2018, 09:18
Hi thoy1,
Just to make sure what you are asking for, you need this part
protected override void OnPositionClosed(Position last) { foreach (var position in Positions) { if (position.NetProfit > -1) { ClosePosition(position); } }
not to trigger OnPositionsClosed again, right?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Feb 2018, 09:12
Hi thegreat.super,
Here s a guide that explains how to debug cBots in Visual Studio. Paul Hayes has also created a couple of cool videos on this subject. You can find one here
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
15 Feb 2018, 16:00
Hi dordkash@gmail.com,
You can use a boolean flag that will be reset on each OnBar()
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
15 Feb 2018, 15:26
Hi Medjan,
This is not in our current plans however I would recommend you to post it in our Suggestions section to be consdered for future releases.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
15 Feb 2018, 14:29
Hi dordkash@gmail.com,
Consider putting your logic in the OnTick() function instead of in the OnBar().
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
15 Feb 2018, 14:12
Hi megamemo,
Thanks for the nice feedback and the clarifications as well. Maybe you would llke to contact a professional Consultant to help you with such a cBot or post a job in the Jobs section.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Feb 2018, 11:17
Hi daguerfi,
When did you observe this behavior? Was it during a weekend?
Best Regards,
Panagiotis
@PanagiotisCharalampous