How to access the date of last bar on chart in StartCalc method

Questions about MultiCharts .NET and user contributed studies.
trd001
Posts: 7
Joined: 25 Jan 2019
Has thanked: 1 time
Been thanked: 1 time

How to access the date of last bar on chart in StartCalc method

Postby trd001 » 01 Apr 2019

Hi,

I'd be very grateful if someone could answer these related questions:

1. How can I get the date of the last bar on chart in StartCalc method?
2. Is it possible to access the "Data Range" data ("from", "to") from the Format Instrument / Settings tab?
3. In general, how can I iterate thru the data of all bars before CalcBar()-method is called?

Thanks for your help, trd001

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

Re: How to access the date of last bar on chart in StartCalc method

Postby Svetlana MultiCharts » 24 Apr 2019

Hello, trd001,

Please find the answers below:
1) You cannot get it in StartCalc method. One can access data series only using CalcBar method.
2) Yes, for example:

Code: Select all

Output.WriteLine("From: {0}, To: {1}", Bars.Info.Request.From, Bars.Info.Request.To);
3) There is no such capability.

trd001
Posts: 7
Joined: 25 Jan 2019
Has thanked: 1 time
Been thanked: 1 time

Re: How to access the date of last bar on chart in StartCalc method

Postby trd001 » 25 Apr 2019

Thank you Svetlana!!!


Return to “MultiCharts .NET”