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.

IEngine.submitOrder() comment string illegal character?
 Post subject: IEngine.submitOrder() comment string illegal character? Post rating: 0   New post Posted: Fri 12 Oct, 2012, 00:18 

User rating: 0
Joined: Thu 04 Oct, 2012, 14:45
Posts: 3
Dear JForex support,

On my permanent demo account I have found that, using the JForex-SDK version 2.7.3 and also 2.7.4, submitting an order with a comment string containing a closing bracket character "]" makes the order submission hang. The server does not reply neither by accepting/filling nor by rejecting the request. It works in all other cases with the same parameters, if the comment string does not contain the character "]".

For the sake of reference here is a listing of the exact arguments that have been passed into engine.submitOrder:

label="tsi_E4wtnJiM_M1001"
instrument=AUD/USD
ordercommand=SELL
amount=0.023
price=0.0
slippage=Double.NaN
stopLossPrice=0.0
takeProfitPrice=0.0
goodTillTime=0L
comment="alma]"

If the comment contains the character "]" as shown above, then the order submission is not successful:

Order SELL 23000 AUD/USD @ MKT is sent at 2012-10-02 20:00:24.674 GMT by the strategy "xxx": from the local computer
<JFOREX CLIENT APPLICATION HANGS, WAITING FOR CONFIRMATION/REJECTION...>

On the other hand, if the "]" is not present in the comment string, the server responds immediately indicating that the order is filled:

Order SELL 23000 AUD/USD @ MKT is sent at 2012-10-02 20:13:44.234 GMT by the strategy "xxx": from the local computer
Order FILLED at 1.02652 USD (#165415223 SELL 0.023 mil. AUD/USD @ MKT) - Position #42885836


The Javadoc has this to say about the comment parameter:

comment - comment that will be saved in order

There is no indication that any characters are forbidden, or any length limitation, etc.

I can of course avoid using the character "]" in order comment strings, but I think this is worth inspection. I look forward to your kind response.

Thank you!


 
 Post subject: Re: IEngine.submitOrder() comment string illegal character? Post rating: 0   New post Posted: Fri 12 Oct, 2012, 07:58 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Fixed in JForex-API 2.7.5.


 

Jump to:  

  © 1998-2025 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