ridgeren wrote:
For backward test, does JForex platform feed the history timestamp to the strategy so I could use tick.getTime()
ITick.getTime() returns time when this particular tick was created
ridgeren wrote:
It's a long type so is it the milliseconds?
Yes, it is time in milliseconds since year 1970
ridgeren wrote:
the line new Date(tick.getTime()) still gives me the time in my zone(EST)
Java Date class always has it's time in GMT time zone internally, but when you call toString() it uses default system time zone. Try this code:
DateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss SSS");
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
console.getOut().println(dateFormat.format(tick.getTime()));
ridgeren wrote:
Besides, when testing, I saw many duplicated orders opened once the first one hit the stoploss, of course all of them hit the SL. In my strategy, I actually loop through the current open orders at first, then open a single order so there shouldn't be more than one opened at certain time. Is this a bug in tester or I should do something differently to avoid this?
It's hard to say what is wrong without seeing you code. Can you post that place where you check for open orders and submit new one?