Save data

Created at 17 Apr 2023, 09:50
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
NE

newseller68

Joined 17.04.2023

Save data
17 Apr 2023, 09:50


Hi: I have an indicator and I want to save the data in a txt or xls file. I have tried several ways with the system.io class or with a dll, but the indicator doesn't work if it used those classes or dll.
What is the best way to save the data in an indicator?


@newseller68
Replies

firemyst
18 Apr 2023, 15:00

cTrader Automate has the local storage ability now with the latest version.

Prior to this version, with the system.io, you need to grant the indicator/bot "full access" in the permissions so it can write to the local file system.

Assuming the folder where you want to write to has write permissions.


@firemyst

newseller68
18 Apr 2023, 19:01

What does full access mean? Why doesn't this work?, the folder has share, write and read permissions

protected override void Initialize()
        {            
            string ruta = @"C:\NO\aqui.txt/";
            File.WriteAllText(ruta,"hola");


@newseller68