How can I get the cAlgo folder?
How can I get the cAlgo folder?
09 Apr 2023, 21:07
Hey guys,
I'm creating a cAlgo bot and I need to read some data inside of a json file placed in cAlgo folder.
The default path is:
C:\Users\USERNAME\Documents\cAlgo\Sources\Robots
I know I could hard code it, but I'd like that working in other computers too - so the user must be dynamic.
I've alread tried this to get the user's documents directory but it returns empty:
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
I'm not sure if that doesn't work because on my PC I had installed OneDrive, so it contains its folder on the path, for example:
C:\Users\USERNAME\OneDrive\Documents\cAlgo\Sources\Robots
But anyway, How I could get cAlgo directory using cTrader?
Thank you!
apfx.trading
09 Apr 2023, 21:56
Just found out a fix:
AccessRights = AccessRights.FullAccess
@apfx.trading