|
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.
ORDER_SUBMIT_REJECTED, no margin |
RoadRunner
|
Post subject: ORDER_SUBMIT_REJECTED, no margin |
Post rating: 0
|
Posted: Mon 24 Jan, 2011, 23:17
|
|
User rating: 3
Joined: Wed 18 May, 2011, 16:25 Posts: 331 Location: SwitzerlandSwitzerland
|
We are getting an ORDER_SUBMIT_REJECTED message with message content 'No margin' in the following case:
A) Tester run with initial account set to 50'000 USD -------------------------------------------------------- A1) at the start of the run we log the account data as follows: iAccount.equity=50000.0 .creditline=5000000.0 .useOfLeverage=0.0 .marginCutLevel=200 .getOverWeekEndLeverage=80
A2) the strategy submits a trade in EUR/USD on Sun 2007.06.10 21:03:04.774 (=first tick after weekend pause) with an amount=0.1million (i.e. ways below the creditline)
A3) onMessage issues message ORDER_SUBMIT_REJECTED, 'No margin' and the order shows CANCELLED PLACE_OFFER 0.1
B) Increasing the account equity to 80'000 USD allows to fill the trade, but then immediately triggers a margin call.
Can you explain, what's going on here? Is this a bug or do I miss something? Kind Regards, RR.
|
|
|
|
 |
API Support
|
Post subject: Re: JFOREX-2682 ORDER_SUBMIT_REJECTED, no margin |
Post rating: 0
|
Posted: Tue 25 Jan, 2011, 15:07
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
For BID/OFFERS orders, the required margin for the order is subtracted after the SUBMITTED instead of FILLED. The Tester calculates the required margin by the price you set. If the amount is too high, the order will be cancelled. Please check the open price you set for this order.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|