How to change Session Time from EasyLanguage script?

Questions about MultiCharts and user contributed studies.
User avatar
Xurma
Posts: 31
Joined: 24 Nov 2020
Has thanked: 9 times

How to change Session Time from EasyLanguage script?

Postby Xurma » 15 Sep 2021

Hello.
Ones I made a mistake and set session time in Quote Manager not in Exchange time but in Local Time. And I saw much better results. In the chart now more gaps because when I choose wrong session time it just cut some history from charts and Indicators calculated without cutted data. I would like to choose best session time but not manual in Quote Manager, I need Multicharts picked up it for me. Is it possible to set Session Time from script?

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: How to change Session Time from EasyLanguage script?

Postby Svetlana MultiCharts » 17 Sep 2021

Hello Xurma,

Unfortunately it is not possible to set sessions from script.

There are several ways to configure sessions.
In Format Instrument -> Settings -> Sessions you can select either Default or one of the session templates.

1) If you select Default the settings are taken from QuoteManager -> right click your symbol -> Edit Symbol -> Sessions.
a) There you can select “Use Exchange and ECN’s Sessions”, then sessions will be taken from the exchange settings (QuoteManager -> Tools -> Exchanges and ECN’s).
b) (for futures only) you can use the Symbol Dictionary and take settings from the Symbol Dictionary for futures, which are applied to all instruments with the same symbol root.
c) Or you can set up custom sessions by selecting the corresponding button.

2) If you select one of session templates in Format Instrument -> Settings -> Sessions you can view their parameters in QuoteManager -> Tools -> Session Templates.
Also you can create your own Custom Session Template and select it directly on chart in Format Instrument -> Settings -> Sessions without changing the settings in QuoteManager.

User avatar
Xurma
Posts: 31
Joined: 24 Nov 2020
Has thanked: 9 times

Re: How to change Session Time from EasyLanguage script?

Postby Xurma » 18 Sep 2021

Thank you for answer. But this way is manual, I need way with auto enumeration by Multicharts software.
I decided to make a new close price series with cutted data in specific time. But I can not change data at the past in numericseries. newclose[1] = 12 does not worked. Then I decided to make an Array where I can change whole array of data like I need. But when you put this array in function such as XAverrage it is not working because it needs numericseries. I read there is no way to convert Array to numericseries.
Svetlana, what should I do to cut some historical data from specific time day by day. My goal is to made new modified numericseries of close price to use it in indicators Instead of close price.

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: How to change Session Time from EasyLanguage script?

Postby Svetlana MultiCharts » 22 Sep 2021

Unfortunately, there is no such feature at the present moment. You can post the corresponding feature request in our Project Management. If you do not have an account to login the Project Management, please contact our support.

Meanwhile you can come up with a scheme, where
  • the script does nothing on a bar that is not included in a certain time interval
  • this interval depends on an input that can be optimized

User avatar
Xurma
Posts: 31
Joined: 24 Nov 2020
Has thanked: 9 times

Re: How to change Session Time from EasyLanguage script?

Postby Xurma » 22 Sep 2021

Meanwhile you can come up with a scheme, where
  • the script does nothing on a bar that is not included in a certain time interval
  • this interval depends on an input that can be optimized
Already done and test it. With cutted data result are better. It is strange but true. I think that is because indicators have wrong calculation(what is better for my strategy), because when you cut some trade hours, indicators plot different curves. When script does nothing in some hours of the day, like you wrote - the indicators is still calculating and don't stop to do it even if you don't trade. Thank you for answers!


Return to “MultiCharts”