Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Time of opened position on global account is always "01.01.1970 00:00:00"
 Post subject: Time of opened position on global account is always "01.01.1970 00:00:00" Post rating: 0   New post Posted: Wed 01 May, 2013, 10:52 
User avatar

User rating: 0
Joined: Wed 10 Oct, 2012, 09:47
Posts: 33
Location: GermanyGermany
Hello,
I am checking now my code on global account (real time , not on tester).
When position is opened I get always time of opening as "Time:01.01.1970 00:00:00" what in milliseconds I suppose is just 0L.
So a code
------
console.getOut().println("Order is "+order.getOrderCommand()+", Time:" + dateFormatMR.format(order.getCreationTime())+", amount="+order.getAmount()+", Price="+order.getOpenPrice()+", StopLossPrice="+ order.getStopLossPrice()+", TakeProfitPrice="+ order.getTakeProfitPrice());
----

produces:
Order is BUY, Time:01.01.1970 00:00:00, amount=0.002079, Price=1.31858, StopLossPrice=0.0, TakeProfitPrice=0.0

whereas on normal hedge account I get for the same position:
Order is BUY, Time:30.04.2013 15:00:00, amount=0.002079, Price=1.31858, StopLossPrice=0.0, TakeProfitPrice=0.0

Could you explain me how to get "true" time of a position on the global account?

Thank you very much in advance,
your client


 
 Post subject: Re: Time of opened position on global account is always "01.01.1970 00:00:00" Post rating: 0   New post Posted: Wed 08 May, 2013, 16:29 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Global account positions don't have creation time, but they have fill time (i.e. IOrder.getFillTime).


 
 Post subject: Re: Time of opened position on global account is always "01.01.1970 00:00:00" Post rating: 0   New post Posted: Wed 08 May, 2013, 17:33 
User avatar

User rating: 0
Joined: Wed 10 Oct, 2012, 09:47
Posts: 33
Location: GermanyGermany
Thank you very much!
:)
Could you please tell me where I can get more info about special properties of global accounts?
The only info I was able to find is from FAQ:
Q: What is the difference between a normal account and a global account?
A: The default account type is called an “hedging account”. On a global account, you cannot open opposite positions on the same instrument, therefore no conditional orders – no Stop loss, take profit, OCO,..

There is some documentation?
Thank you in advance! :geek:


 
 Post subject: Re: Time of opened position on global account is always "01.01.1970 00:00:00" Post rating: 0   New post Posted: Thu 09 May, 2013, 07:41 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
JForex-API order method behaviour reflects what you see in the platform. What concerns JForex-API documentation for global accounts, we are going to update the javadocs.


 

Jump to:  

  © 1998-2026 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com