|
how to set timezone in jforex sdk? |
henry86
|
Post subject: how to set timezone in jforex sdk? |
Post rating: 0
|
Posted: Thu 24 Sep, 2015, 08:45
|
|
User rating: 0
Joined: Fri 18 Sep, 2015, 14:32 Posts: 15 Location: Germany, Dresden
|
Hello Ladies and Gentleman,
for the calculation of pivot Points it is necessary to set the right timezone. But how to set the timezone in the sdk? Does e.g. the Pivot Indicator use the default system timezone?
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
But this doesn't give the same results for pivot as the standard JForex Plattform. Any Ideas?
Best Regards, henry
|
|
|
|
|
Platform Support
|
Post subject: Re: how to set timezone in jforex sdk? |
Post rating: 0
|
Posted: Tue 10 Nov, 2015, 10:20
|
|
JForex Master | |
User rating: ∞
Joined: Wed 16 Sep, 2009, 18:23 Posts: 1049 Location: Geneva, Switzerland
|
You should use a custom period - Period.createCustomPeriod(Unit unit, int unitsCount, JFTimeZone jfTimeZone);
E.g. when calculating an indicator (pivot) for Daily candles with CST time zone, at first create a period: Period period = Period.createCustomPeriod(Unit.Day, 1, JFTimeZone.CST); now give the created period to some of the pivot methods, e.g.: context.getIndicators().pivot2(Instrument.EURUSD, period, OfferSide.ASK, 5);
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|