J.Lo
18 Dec 2024, 22:45
( Updated at: 19 Dec 2024, 22:13 )
Upon further analysis -
I removed the faulty indicator and built my own. My stats are now identical between back testing and live
What i have noticed is that back testing will “fill” everything while live does not and it often misses take profit targets 🤷 *mystery solved. (so always take your back testing results with a big grain of salt)
Multiple issues have now been raised - the UI becomes unresponsive after a while (backtesting start button and start bot button) posts: #45361, #45335, #45370
I'm encountering also issues with cTrader version 5.0.40 on Windows:
After running the platform for a few minutes, the start buttons for cBots in the Algo section become greyed out and unresponsive. Restarting cTrader temporarily resolves this, allowing me to start a cBot, but the issue soon recurs. Interestingly, any cBot already running continues without issues, but once stopped, it can’t be restarted until cTrader is completely restarted.
Regards, Anus+
I am also experiencing the same issue ( i even did a clean reinstall but the issue remains).
ps; even though the bots seem to be running, it does not execute trades (at least not in my case)
Workaround: starting your bots in an “external” process seems to work.
You can see if you are experiencing this issue by clicking on “Add Instance”, this wheel of death appears
Just found the debug file: not sure if this is the issue:
says “algohost.cc (185) ”There are no target services!!!)
I'm encountering also issues with cTrader version 5.0.40 on Windows:
After running the platform for a few minutes, the start buttons for cBots in the Algo section become greyed out and unresponsive. Restarting cTrader temporarily resolves this, allowing me to start a cBot, but the issue soon recurs. Interestingly, any cBot already running continues without issues, but once stopped, it can’t be restarted until cTrader is completely restarted.
Regards, Anus+
I am also experiencing the same issue ( i even did a clean reinstall but the issue remains).
ps; even though the bots seem to be running, it does not execute trades (at least not in my case)
Workaround: starting your bots in an “external” process seems to work. UPDATE: also fails ☹️
You can see if you are experiencing this issue by clicking on “Add Instance”, this wheel of death appears
J.Lo
22 Oct 2024, 19:47
( Updated at: 22 Oct 2024, 20:03 )
position_closed looping for all bot instances
Still happening in 2024. i have multiple instances running. when a position closes and the position_closed event fires, it triggers this method for all instances (although it does just close the actual trade)
I can tell because i receive the SMS's *freaked me out
In fact, i noticed this behaviour in Positions_Modified and Positions_Opened aswell
My fix
private void Positions_Closed(PositionClosedEventArgs obj){ //step: weird bug - do not fire for symbols that are not the same - picked this up in my sms's if(obj.Position.Symbol.Name.ToUpper() != Symbol.Name.ToUpper()) return;
J.Lo
19 May 2023, 02:13
( Updated at: 21 Dec 2023, 09:23 )
RE:
Spotware said:
Dear trader,
Thanks for reporting this issue. In order to investigate this further, we would need the source code of the cBot you are using.
Best regards,
cTrader Team
Here you go .. i just created a sample. simply add a new unit test and run it.. Although not as extreme as my real bot, you should notice the RAM going up but never coming back down
I can't see a place to attach a zip file *shrug
just used a sample
using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class SampleRSIcBot : Robot
{
[Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 1, MinValue = 0.01, Step = 0.01)]
public double Quantity { get; set; }
[Parameter("Source", Group = "RSI")]
public DataSeries Source { get; set; }
[Parameter("Periods", Group = "RSI", DefaultValue = 14)]
public int Periods { get; set; }
private RelativeStrengthIndex rsi;
protected override void OnStart()
{
rsi = Indicators.RelativeStrengthIndex(Source, Periods);
}
protected override void OnTick()
{
if (rsi.Result.LastValue < 30)
{
Close(TradeType.Sell);
Open(TradeType.Buy);
}
else if (rsi.Result.LastValue > 70)
{
Close(TradeType.Buy);
Open(TradeType.Sell);
}
}
private void Close(TradeType tradeType)
{
foreach (var position in Positions.FindAll("SampleRSI", SymbolName, tradeType))
ClosePosition(position);
}
private void Open(TradeType tradeType)
{
var position = Positions.Find("SampleRSI", SymbolName, tradeType);
var volumeInUnits = Symbol.QuantityToVolumeInUnits(Quantity);
if (position == null)
ExecuteMarketOrder(tradeType, SymbolName, volumeInUnits, "SampleRSI");
}
}
}
Then the Unit Test Project
namespace TestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Assert.IsTrue(true);
}
[TestMethod]
public void TestMethod2()
{
for(int i=0; i < 100000000; i++)
{
string debug = i.ToString();
}
Assert.IsTrue(true);
}
}
}
unfortunately cTrader is installed in the documents folder . this is the same folder that automatically is added to Microsoft OneDrive (new pc install for windows 10). all these files are then synced and managed by Microsoft. I would be nervous trying to run an application with source files located in a onedrive location *shrug
fyi, i changed my default one drive location and the stability and memory allocation has improved
J.Lo
18 Dec 2024, 22:45 ( Updated at: 19 Dec 2024, 22:13 )
Upon further analysis -
I removed the faulty indicator and built my own. My stats are now identical between back testing and live
What i have noticed is that back testing will “fill” everything while live does not and it often misses take profit targets 🤷 *mystery solved. (so always take your back testing results with a big grain of salt)
@J.Lo