|
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.
Trouble setting lot size for XAUUSD in a strategy |
Frank_
|
Post subject: Trouble setting lot size for XAUUSD in a strategy |
Post rating: 0
|
Posted: Sat 08 Oct, 2011, 18:25
|
|
User rating: 2
Joined: Tue 16 Aug, 2011, 19:01 Posts: 70 Location: ItalyItaly
|
Hi Support, I noted a trouble when I set the lot size in a strategy for XAUUSD. The lot, as said before in other posts, is in million of unit (that is ounce), so if I want to open 1 unit I should set
lot = 0.000001
but when I backtest the strategy (that I attached), the system doesn't accept this value and requires a minimum amount >= 1000, in fact shows the following messages:
... 16:34:34 Your order has been rejected due to validation failure. Invalid amount value, amount must be >= 1000 16:34:34 Strategy tester: java.lang.NullPointerException @ jforex.strategies.oneorder.OneOrderXAG_Modificato.onBar(OneOrderXAG_Modificato.java:29) 16:34:34 Start
-------------------------------------------------------- when I set the minimun lot that is
lot = 0.001
it tries to open 1000 OUNCES so if the "Initial Deposit" is equal to 1000 $ it gives an error of "No margin available" in fact shows the following messages:
16:48:24 No margin available 16:48:24 Order canceled 16:48:24 Order submitted 16:48:24 Strategy tester: java.lang.NullPointerException @ jforex.strategies.oneorder.OneOrderXAG_Modificato.onBar(OneOrderXAG_Modificato.java:29) 16:48:24 Start
--------------------------------------------------------
if I set
lot = 0.001 "Initial Deposit" = 100000 $
the strategy runs and opens 1000 OUNCES (UNITS), BUT I WANTED TO OPEN ONLY 1 OUNCE (UNIT)
These ones are the lines showd in the historical tester
... 17:00:21 CLOSED Position 17:00:21 Order filled 17:00:21 Order submitted 17:00:21 CLOSED Position 17:00:21 Start
and these ones are the first 2 lines of "Event Log" in Report page.
2011-09-01 01:00:00 Order submitted Order [order1, XAU/USD, BUY, 1000.0 at 0.0] submitted by the strategy 2011-09-01 01:00:00 Order filled Order [order1, XAU/USD, BUY, 1000.0 at 1826.072] filled ...
Best regards, Frank
Attachments: |
OrderXAUUSD.java [1.69 KiB]
Downloaded 306 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
API Support
|
Post subject: Re: Trouble setting lot size for XAUUSD in a strategy |
Post rating: 0
|
Posted: Mon 10 Oct, 2011, 07:13
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
buyandhold
|
Post subject: Re: Trouble setting lot size for XAUUSD in a strategy |
Post rating: 0
|
Posted: Wed 18 Jan, 2012, 17:41
|
|
User rating: 0
Joined: Wed 18 May, 2011, 23:26 Posts: 40 Location: Switzerland,
|
submitOrder minimum size of 1000 units (0.001) is still an issue in 2.13.38 (api 2.13.38.1) demo platform. Is there a known solution?
|
|
|
|
 |
API Support
|
Post subject: Re: Trouble setting lot size for XAUUSD in a strategy |
Post rating: 0
|
Posted: Thu 19 Jan, 2012, 15:22
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Please see our previous post - the JForex client release is yet to take place.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|