|
Attention! Read the forum rules carefully before posting a topic.
Submit JForex API bug reports in this forum only. Submit Converter issues in Converter Issues. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
IHistory getBarStart(Period period, long time) time zone |
pminc74
|
Post subject: IHistory getBarStart(Period period, long time) time zone |
Post rating: 0
|
Posted: Thu 12 Mar, 2020, 12:49
|
|
User rating: 3
Joined: Fri 15 Nov, 2019, 12:54 Posts: 16 Location: Poland,
|
Hi,
According to my tests, the IHistory:getBarStart(Period period, long time) method returns the candle start time always in GMT time zone, regardless current time zone settings (on client machine, on platform settings). It is meaningful in higher periods (four hours, daily, weekly ...).
Is that correct?
The same is for getTimeForNBarsForward() and probalby other fmethods of IHistory.
|
|
|
|
|
pminc74
|
Post subject: Re: IHistory getBarStart(Period period, long time) time zone |
Post rating: 0
|
Posted: Fri 13 Mar, 2020, 14:51
|
|
User rating: 3
Joined: Fri 15 Nov, 2019, 12:54 Posts: 16 Location: Poland,
|
My workaround is as follows:
Long dateTimeGMT = toTimeZoneGMT(dateTime); // convert value to GMT zone, my util function Long barStartTime = this.getHistory().getBarStart(period, dateTimeGMT); // or other IHistory method Long returnValue = toTimeZoneCET(barStartTime); // convert back to my zone, my util function
|
|
|
|
|
pminc74
|
Post subject: Re: IHistory getBarStart(Period period, long time) time zone |
Post rating: 0
|
Posted: Mon 16 Mar, 2020, 15:00
|
|
User rating: 3
Joined: Fri 15 Nov, 2019, 12:54 Posts: 16 Location: Poland,
|
This problem occurs, when connecting through com.dukascopy.api.system.IClient.
When calling IHistory methods from Indicator -> is OK.
|
|
|
|
|
API Support
|
Post subject: Re: IHistory getBarStart(Period period, long time) time zone |
Post rating: 0
|
Posted: Tue 24 Mar, 2020, 17:57
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|