Can you please share with us the source code of your cBot and provide us with instructions on how to reproduce this problem?
Best regards,
Panagiotis
Hey Panagiotis, I am attempting to log each position that closes in either the OnPositionClosed event or a CloseTrade sub. Multiple cbots with multiple instances will be running. Positions are logged in a csv file. Typically multiple entries are created in the csv which have different instanceIDs but have the same Label, which is set to the InstanceId when opening.
scenario 1 (CloseTrade)
Position Opened: ExecuteMarketOrder(TradeType.Buy, SymbolName, adjustedContracts, InstanceId, null, null);
Position Closes on x number of bars being reached, which then calls CloseTrade
If multiple instances are running then the event will be triggered multiple times, once per instance. You should check inside the event handler if the closed position has been created by the specific instance and only then log it.
Best regards,
Panagiotis
Hey Panagiotis, So to confirm, a new instance is created every time a new position opens. So would the code below reference the correct instance:
Can you share a screenshot demonstrating what you are looking at?
Best regards,
Panagiotis
When attempting to click on "Modify Position," there's no response or display. The same issue occurs when trying to click on "Modify Order" for Pending Orders. Overall, the "Modify" function isn't functioning.
Hi there,
Make sure the form does not open on an external display that has been disconnected. Try also restarting cTrader and your pc.
Best regards,
Panagiotis
I tried everything you mentioned. I've been facing the issue for 10 days. So, in between, I switched off my laptop many times. I don't think it's a problem with the PC. Also, I reinstalled cTrader. But still facing the same issue. Just don't know how to solve it. Desperately need help brother.
The issue is still not resolved.Kindly have a look at this.
Hi there,
Can you please record a video demonstrating this happening? Also in the video, please show the Display Settings open showing that there is only one screen used by your computer.
Best regards,
Panagiotis
How can I send the video here related to the problem ? It is not accepting files from my PC and even Google drive link
Can you please provide more information about your issue? When does the application close? Can you record a video? What do you mean with preset commands?
Can you please share with us the source code of your cBot and provide us with instructions on how to reproduce this problem?
Best regards,
Panagiotis
Hey Panagiotis, I am attempting to log each position that closes in either the OnPositionClosed event or a CloseTrade sub. Multiple cbots with multiple instances will be running. Positions are logged in a csv file. Typically multiple entries are created in the csv which have different instanceIDs but have the same Label, which is set to the InstanceId when opening.
scenario 1 (CloseTrade)
Position Opened: ExecuteMarketOrder(TradeType.Buy, SymbolName, adjustedContracts, InstanceId, null, null);
Position Closes on x number of bars being reached, which then calls CloseTrade
If multiple instances are running then the event will be triggered multiple times, once per instance. You should check inside the event handler if the closed position has been created by the specific instance and only then log it.
The issue is under investigation and will be resolved asap.
Best regards,
Panagiotis
Thanks, Notifications started again about 3 hours ago.
Just FYI but assume you are probably aware, the notifications are currently showing UNKNOWN for the asset type i.e. “SELL position for UNKNOWN of 1.00 closed successfully”
Cheers
Rob
Hi Rob,
Does this happen on all symbols or a specific one? Can you share the broker, the symbol and a screenshot?
Active Symbol Panel will be added in a future update of the application.
Best regards,
Panagiotis
Hey! Do you have any updates on this? Can we expect the Active Symbol Panel anytime soon? Without ASP, the user experience is quite bad.
As an alternate to Mac OS version, I'm currently using the web app but unfortunately web app performance is not that great. (The web page suddenly crashes with a message ‘Aw, Snap!’. ).
More info on device: I'm using latest version of chrome browser on MacOS latest version, Macbook Pro M3 Pro, 32GB ram.
If you can share the cBot code, we can have a look. Also make sure you use tick data for your backtesting.
Best regards,
Panagiotis
Here is the Bot Code .
You can find the parameters I used in the pictures above.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using cAlgo.API; using cAlgo.API.Collections; using cAlgo.API.Indicators; using cAlgo.API.Internals;
namespace cAlgo.Robots {
[Robot(TimeZone = TimeZones.WEuropeStandardTime, AccessRights = AccessRights.None)] public class EBOTTRADEIRL: Robot {
[Parameter("Risk %", Group = "Risk",DefaultValue = 0.02)] public double RiskPCT { get; set; }
[Parameter("ATR MA Type",Group = "ATR")] public MovingAverageType ATRMAType { get; set; }
[Parameter("ATR Period", Group = "ATR", DefaultValue = 14)] public int ATRPeriod { get; set; }
[Parameter("RSI MA Period", Group = " RSI", DefaultValue = 8)] public int RSIPeriod { get; set; } [Parameter("RSI Type", Group = " RSI" , DefaultValue = MovingAverageType.Exponential)] public MovingAverageType RSIType { get; set; }
[Parameter("RSIMA MA Period", Group = " RSI", DefaultValue = 8)] public int RSIMAPeriod { get; set; }
[Parameter("RSIMA Type", Group = " RSI" , DefaultValue = MovingAverageType.Exponential)] public MovingAverageType RSIMAType { get; set; }
[Parameter("SSL Period", Group = " SSL ", DefaultValue = 8)] public int SSLPeriod{ get; set; }
[Parameter("SSL Type", Group = " SSL" , DefaultValue = MovingAverageType.Exponential)] public MovingAverageType SSLMAType { get; set; }
[Parameter("Baseline Period", Group = " Baseline ", DefaultValue = 8)] public int BLMAPeriod{ get; set; } [Parameter("Baseline MA", Group = " Baseline" , DefaultValue = MovingAverageType.Exponential)] public MovingAverageType BLMAType { get; set; }
[Parameter("MACD Long Cycle", Group = " MACD ", DefaultValue = 21)] public int MACDLong{ get; set; }
[Parameter("MACD Short Cycle", Group = " MACD ", DefaultValue = 8)] public int MACDShort{ get; set; } [Parameter("MACD Signal", Group = " MACD ", DefaultValue = 12)] public int MACDSignal{ get; set; }
[Parameter("StopLoss Factor", Group = "Risk", DefaultValue = 1)] public double SLM { get; set; } [Parameter("TakeProfit Factor", Group = "Risk", DefaultValue = 1)] public double TPM { get; set; }
var C2 = ssl._sslUp.Last(0) - ssl._sslDown.Last(0); var PrefC2 = ssl._sslUp.Last(1)-ssl._sslDown.Last(1); var C2U = ssl._sslUp.Last(0); var C2D = ssl._sslDown.Last(0);
var C6 = rsi.Result.Last(0); var PrefC6 = rsi.Result.Last(1);
var C7 = rsiMA.Result.Last(0); var C8 = rsiMA.Result.Last(1);
var BaseLine = bl.Result.Last(0);
var Macd = macd.MACD.Last(0); var MacdSig = macd.Signal.Last(0);
{ foreach (var position in Positions.FindAll(Label, SymbolName, tradeType))
ClosePosition(position); }
// Handle cBot stop here }
}
As per your suggestion , I ran the bot with Tick data and also found that there is no consistency in the Visual and non visual testing.
The bot now did not show a profit with the Tick data, but it made 2000 trades more with the non visual vs visual testing and it stopped 2 weeks later when the balance ran to zero.
This is a problem which CTrader must address because it leaves a situation where no algo supplier can be be trusted with their bots on any broker platform.
Hi there,
We are still missing the SSL Channel indicator you are using. Can you please share it with us?
Best regards,
Panagiotis
You can find the SSL indicator on the community indicators forum at Spotware. but as you can see from the code I did not use it.
The code does not build without the indicator. Please either provide a link to the actual indicator or provide cBot code that builds without the need of a reference
Apologies I see I used it. You can get the SSL Channel indicator on the CTrader indicators pages.
If you can share the cBot code, we can have a look. Also make sure you use tick data for your backtesting.
Best regards,
Panagiotis
Here is the Bot Code .
You can find the parameters I used in the pictures above.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using cAlgo.API; using cAlgo.API.Collections; using cAlgo.API.Indicators; using cAlgo.API.Internals;
namespace cAlgo.Robots {
[Robot(TimeZone = TimeZones.WEuropeStandardTime, AccessRights = AccessRights.None)] public class EBOTTRADEIRL: Robot {
[Parameter("Risk %", Group = "Risk",DefaultValue = 0.02)] public double RiskPCT { get; set; }
[Parameter("ATR MA Type",Group = "ATR")] public MovingAverageType ATRMAType { get; set; }
[Parameter("ATR Period", Group = "ATR", DefaultValue = 14)] public int ATRPeriod { get; set; }
[Parameter("RSI MA Period", Group = " RSI", DefaultValue = 8)] public int RSIPeriod { get; set; } [Parameter("RSI Type", Group = " RSI" , DefaultValue = MovingAverageType.Exponential)] public MovingAverageType RSIType { get; set; }
[Parameter("RSIMA MA Period", Group = " RSI", DefaultValue = 8)] public int RSIMAPeriod { get; set; }
[Parameter("RSIMA Type", Group = " RSI" , DefaultValue = MovingAverageType.Exponential)] public MovingAverageType RSIMAType { get; set; }
[Parameter("SSL Period", Group = " SSL ", DefaultValue = 8)] public int SSLPeriod{ get; set; }
[Parameter("SSL Type", Group = " SSL" , DefaultValue = MovingAverageType.Exponential)] public MovingAverageType SSLMAType { get; set; }
[Parameter("Baseline Period", Group = " Baseline ", DefaultValue = 8)] public int BLMAPeriod{ get; set; } [Parameter("Baseline MA", Group = " Baseline" , DefaultValue = MovingAverageType.Exponential)] public MovingAverageType BLMAType { get; set; }
[Parameter("MACD Long Cycle", Group = " MACD ", DefaultValue = 21)] public int MACDLong{ get; set; }
[Parameter("MACD Short Cycle", Group = " MACD ", DefaultValue = 8)] public int MACDShort{ get; set; } [Parameter("MACD Signal", Group = " MACD ", DefaultValue = 12)] public int MACDSignal{ get; set; }
[Parameter("StopLoss Factor", Group = "Risk", DefaultValue = 1)] public double SLM { get; set; } [Parameter("TakeProfit Factor", Group = "Risk", DefaultValue = 1)] public double TPM { get; set; }
var C2 = ssl._sslUp.Last(0) - ssl._sslDown.Last(0); var PrefC2 = ssl._sslUp.Last(1)-ssl._sslDown.Last(1); var C2U = ssl._sslUp.Last(0); var C2D = ssl._sslDown.Last(0);
var C6 = rsi.Result.Last(0); var PrefC6 = rsi.Result.Last(1);
var C7 = rsiMA.Result.Last(0); var C8 = rsiMA.Result.Last(1);
var BaseLine = bl.Result.Last(0);
var Macd = macd.MACD.Last(0); var MacdSig = macd.Signal.Last(0);
{ foreach (var position in Positions.FindAll(Label, SymbolName, tradeType))
ClosePosition(position); }
// Handle cBot stop here }
}
As per your suggestion , I ran the bot with Tick data and also found that there is no consistency in the Visual and non visual testing.
The bot now did not show a profit with the Tick data, but it made 2000 trades more with the non visual vs visual testing and it stopped 2 weeks later when the balance ran to zero.
This is a problem which CTrader must address because it leaves a situation where no algo supplier can be be trusted with their bots on any broker platform.
Hi there,
We are still missing the SSL Channel indicator you are using. Can you please share it with us?
Best regards,
Panagiotis
You can find the SSL indicator on the community indicators forum at Spotware. but as you can see from the code I did not use it.
The code does not build without the indicator. Please either provide a link to the actual indicator or provide cBot code that builds without the need of a reference
For the time being, the backtesting feature supports a year of historical data. More data is likely to be included in the future but it is difficult to say up to which date, though. Could you let us know why it is important to you to have such large range of data for backtesting? Thank you in advance.
This message is from 2013. I wonder if this problem with the historical data continues to this day. I mean if I would like more historical data for conjugate indicators or pairs in Forex, how could I access them?
Hi there,
Historical data is provided by brokers. If you need more data, please contact your broker.
PanagiotisCharalampous
11 May 2024, 07:01
I checked both cases with tick data and the results are identical
Best regards,
@PanagiotisCharalampous