set a default timeframe for a bot

Created at 26 Oct 2022, 14:45
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!
MI

mindfulness

Joined 04.07.2021

set a default timeframe for a bot
26 Oct 2022, 14:45


Hello,

 

i have searched now the whole morning, but didn´t get it. I would like to set a default timeframe fro a bot. Everytime i recompile it and add the pairs again, i have to change the timeframe. I would like to spare this time. ;)

Anyone who can give me the may only two line of code?

 

thanks in advanced

 

Alex


@mindfulness
Replies

PanagiotisChar
27 Oct 2022, 09:16

Hi Alex,

It's not possible to change a chart's timeframe from a cBot.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar

mindfulness
27 Oct 2022, 09:58

RE:

PanagiotisChar said:

Hi Alex,

It's not possible to change a chart's timeframe from a cBot.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 

Hmm, maybe i have make it not clear. I don´t want to change the chart timeframe. Only the timeframe the bot is using for the complete code when running.


@mindfulness

PanagiotisChar
27 Oct 2022, 10:59

Hi Alex,

If you mean a parameter, then use the DefaultValue

        [Parameter("TimeFrame", DefaultValue = "Minute")]
        public TimeFrame TimeFrame { get; set; }

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us


@PanagiotisChar

mindfulness
27 Oct 2022, 13:38

RE:

PanagiotisChar said:

Hi Alex,

If you mean a parameter, then use the DefaultValue

        [Parameter("TimeFrame", DefaultValue = "Minute")]
        public TimeFrame TimeFrame { get; set; }

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

Thanks, but that´s maybe not the one. I mean when i add pait to the bot, it has per default H1 as a timeframe. I want to have M5 as default. Is this possible?


@mindfulness