Positions opening in wrong CAlgo account , when two different Calgo accounts are connected.
Positions opening in wrong CAlgo account , when two different Calgo accounts are connected.
27 Sep 2024, 10:01
Had a problem last night with positions opening in the wrong account it seems.
I have one Ctrader account, and in there I have multiple Pepperstone Live and Demo accounts.
Positions belonging to my “Demo CAlgo account” were opening/closing in my “Live CAlgo account” instead. This happens second time this month.
I run two console CAlgos, Live and Demo, on the same computer, both started with “ctrader-cli.exe run”
. Each connects to separate Pepperstone account, one Live and one Demo. Normally each Clago opens trades in the corresponding account.
While I don’t write the Calgo journal to a log file ( haven’t checked how ), each Clago writes a file log in its own folder. Last night I can see log records in my Demo Calgo, yet all these trades got opened in the Live account. After restarting the Demo CLgo it resumed opening trades in the corresponding Pepperstone Demo account.
My orders open with ExecuteMarketOrderAsync()
and immediately after that, a log file is written to specific directory with File.Move(file, fileMovePath, true);
therefore I appear to be certain which algo was operating as each one uses separate log paths.
My questions are:
1) Is it possible that due to the fact two separate CAlgos are connected , a situation can occur on the Ctrader server side that would result in the server opening trades coming from one Calgo connection into the other ?
Sample such trade:
Requesting Order: OID36457975
Resulting Position : PID20466217
Openning time : 27/09/2024 00:52:4 UTC
Opened in account 2009205:
Was supposed to open in account( CAlgo account): 4160062
PanagiotisCharalampous
30 Sep 2024, 05:37
Hi there,
If you think this is a bug of CLI and not a user mistake, then you would need to document it with a bit more evidence e.g. some screenshots or videos showing this happening, as well as provide any other information that could help the team reproduce such a behavior.
Best regards,
Panagiotis
@PanagiotisCharalampous