Getting trading hours

Created at 13 Dec 2017, 08:32
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!
PA

paanoik@seznam.cz

Joined 13.12.2017

Getting trading hours
13 Dec 2017, 08:32


Hi,

as I want to test a bot that ignores start and end of the trading interval, I'm interested in dynamicaly getting trading hours for curent day of server.time for curent symbol as trading hours were changed in the past few times. Is there any mechanism for this or I need to discover past changes and implement them?

Thanks

T.


@paanoik@seznam.cz
Replies

ap11
13 Dec 2017, 12:40

Hi T.,

I'm afraid you need to do it by yourself.

Now cAlgo APIs has no methods to get info about trading sessions. Next cTrader version has new Symbol.MarketSeries APIs. You will be able to get list of current sessions and check if instrument is active or not.

But we are not planning to add methods for history of trading sessions settings.

Kind Regards,
Andrey


@ap11

paanoik@seznam.cz
13 Dec 2017, 16:20

OK, thank you.

I'll run analysis on history data and create some hardcoded trade hours based on this. Should be easy. I was just curious if not missing something.

T.


@paanoik@seznam.cz

lec0456
17 Dec 2017, 04:15

here is an indicator that might help:

/algos/indicators/show/235


@lec0456