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.

How to place Market Stop Order
 Post subject: How to place Market Stop Order Post rating: 0   New post Posted: Fri 01 Oct, 2010, 03:41 

User rating: 0
Joined: Tue 10 Aug, 2010, 21:51
Posts: 10
Hi Support,
JFOREX api provides submitOrder method to place buy market/sell market order which doesn't take any slippage as a input parameter.
on same line, Is there any way I can place market stop order? (I don't want to use slippage, I just want to execute order once stop is hit)
I see , all versions of submitOrder method to place stop order takes slippage as input parameter which makes it impossible to place pure market stop order.

of course, work around is to use very big slippage so that stop limit order will always get executed as market. But I don't want to specify slippage at all.

Rahul K.


 
 Post subject: Re: How to place Market Stop Order Post rating: 0   New post Posted: Mon 04 Oct, 2010, 09:48 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Quote:
Is there any way I can place market stop order?

Yes, any IEngine.submitOrder, but with slippage -1


 
 Post subject: Re: How to place Market Stop Order Post rating: 0   New post Posted: Wed 06 Oct, 2010, 06:45 

User rating: 0
Joined: Tue 10 Aug, 2010, 21:51
Posts: 10
Support wrote:
Hi,
Quote:
Is there any way I can place market stop order?

Yes, any IEngine.submitOrder, but with slippage -1


I tried buy market order by using -1 as slippage still it takes default slippage 0.0005

Thanks but it is not working.

This is a sample code I am using:
engine.submitOrder(label, instrument, IEngine.OrderCommand.BUY, amount, 0, -1);

This is a message I am getting:
05:33:25 Order FILLED at 0.98591 CAD (#51632803 BUY 0.01 mil. AUD/CAD @ MKT MAX SLIPPAGE 0.0005) - Position #180345AUD/CAD

As you said there should be no slippage but still it takes slippage as 0.0005.

If I Buy using JFOREX platform directly without using slippage control, below are the messages I get:
2010-10-06 05:41:59 Order FILLED at 0.98592 CAD (#51637371 BUY 0.01 mil. AUD/CAD @ MKT) - Position #180345AUD/CAD
2010-10-06 05:43:24 Order BUY 10000 AUD/CAD @ MKT is sent at 2010-10-06 05:43:24.695 GMT manually

I want to place order exactly same way as JFOREX platform. Are there any APIs used only by JFOREX platform and not available to JOFOREX api programmers??


 
 Post subject: Re: How to place Market Stop Order Post rating: 0   New post Posted: Mon 11 Oct, 2010, 08:39 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Sorry, it seems setting very big slippage is the only way right now


 

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