Finding default timeframe programmatically.

Created at 05 Apr 2018, 16:11
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!
alexander.n.fedorov's avatar

alexander.n.fedorov

Joined 02.01.2018

Finding default timeframe programmatically.
05 Apr 2018, 16:11


Dear Panagiotis!

How can I find default timeframe programmatically?

Regards, 

Sasha


@alexander.n.fedorov
Replies

PanagiotisCharalampous
05 Apr 2018, 16:15

Hi Sasha,

Each cBot has a TimeFrame parameter. See below

        protected override void OnStart()
        {
            Print(TimeFrame.ToString());
        }

Hope this helps you!

Best Regards,

Panagiotis


@PanagiotisCharalampous

alexander.n.fedorov
05 Apr 2018, 16:18

That was easy. Thank you.


@alexander.n.fedorov