|
JFOREX-3169 history.getStartTimeOfCurrentBar wrong time |
RoadRunner
|
Post subject: JFOREX-3169 history.getStartTimeOfCurrentBar wrong time |
Post rating: 0
|
Posted: Mon 29 Aug, 2011, 17:48
|
|
User rating: 3
Joined: Wed 18 May, 2011, 16:25 Posts: 331 Location: SwitzerlandSwitzerland
|
history.getStartTimeOfCurrentBar returns the wrong time, if the the time of the current tick (ITick.getTime() ) is exactly on the first millisecond of the new bar.
Example: Instrument USD/JPY, ITick.getTime()= 'Mon 2011.06.06 08:00:00.000' [1307347200000] history.getStartTimeOfCurrentBar(Instrument.USDJPY, Period.FOUR_HOURS) returns 'Mon 2011.06.06 04:00:00.000' [1307332800000] instead of 'Mon 2011.06.06 08:00:00.000'
Best, RR.
|
|
|
|
 |
API Support
|
Post subject: Re: JFOREX-3169 history.getStartTimeOfCurrentBar wrong time |
Post rating: 0
|
Posted: Wed 31 Aug, 2011, 11:02
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Was the tick being taken by a strategy.onTick(Instrument instrument, ITick tick) method? When the history.getStartTimeOfCurrentBar(Instrument.USDJPY, Period.FOUR_HOURS) was invoked? Was it called directly from "strategy.onTick()" method?
|
|
|
|
 |
RoadRunner
|
Post subject: Re: JFOREX-3169 history.getStartTimeOfCurrentBar wrong time |
Post rating: 0
|
Posted: Thu 01 Sep, 2011, 14:22
|
|
User rating: 3
Joined: Wed 18 May, 2011, 16:25 Posts: 331 Location: SwitzerlandSwitzerland
|
yes, it was called from within the strategy.onTick(Instrument instrument, ITick tick) method.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|