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.

Market if touched orders
 Post subject: Market if touched orders Post rating: 0   New post Posted: Fri 27 May, 2011, 13:28 

User rating: 0
Joined: Fri 27 May, 2011, 13:24
Posts: 4
Location: UA
Hello.
Can anybody tell how to open "market if touched" orders?
Can't find any information about it.
Thanks in advance.


 
 Post subject: Re: Market if touched orders Post rating: 0   New post Posted: Fri 27 May, 2011, 19:42 

User rating: -
desmax wrote:
Hello.
Can anybody tell how to open "market if touched" orders?
Can't find any information about it.
Thanks in advance.


do you mean to say it's a conditional order or OCO order.

in conditional order, your order will trigger only if the bid/ask is the market order and it will be filled once the market touches your order.

in case of OCO (one cancells other) order, you expect either the upper band or the lower band touches and any order gets filled, the other order will be cancelled.

it's possible to place conditional order but not OCO order in the competition as of now.


 
 Post subject: Re: Market if touched orders Post rating: 0   New post Posted: Mon 30 May, 2011, 10:01 

User rating: 0
Joined: Fri 27 May, 2011, 13:24
Posts: 4
Location: UA
Hm.
My problem is that the orders isn't opening sometimes.
I don't understand why. I use BUYSTOP and SELLSTOP order types.
Example:
BUYSTOP order has open price greater or equal 1.4130.
when price is growing and reach 1.4130 - order doesn't open. And if price became more than 1.4130 and then falls below 1.4130 - order finally opens.
If I use slippage - orders open like I expect.(2 pips).
And there is a question: Why is this happening? And can I open STOP-orders without slippage at all?
I'm trying to open orders like this:
engine.submitOrder(getLabel(OrderCommand.SELLSTOP), this.instrument, IEngine.OrderCommand.SELLSTOP, curAmount, curPrice - threshold*2, slippage, stopLossPrice, 0, 0, "order2");

I thought that mit orders would help me.

P.S. Sorry for mistakes in the message. I'm only learning English. If someone can fix my mistakes and send me pm - it will be great :))


 
 Post subject: Re: Market if touched orders Post rating: 0   New post Posted: Mon 30 May, 2011, 20:04 

User rating: 0
Joined: Fri 27 May, 2011, 13:24
Posts: 4
Location: UA
And how to open conditional orders?


 
 Post subject: Re: Market if touched orders Post rating: 0   New post Posted: Wed 01 Jun, 2011, 12:39 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
desmax wrote:
Why is this happening? And can I open STOP-orders without slippage at all?
For stop entries see JForex wiki:
https://www.dukascopy.com/wiki/index.php ... ntry_Order
and in particular - see examples starting from section "Stop Entry Buy when BID >=".
desmax wrote:
And how to open conditional orders?
By passing a conditional order type of IEngine.OrderCommand enumerator to IEngine.submitOrder.
See:
https://www.dukascopy.com/client/javadoc//com/dukascopy/api/IEngine.html#submitOrder(java.lang.String,%20com.dukascopy.api.Instrument,%20com.dukascopy.api.IEngine.OrderCommand,%20double,%20double)
and:
https://www.dukascopy.com/client/javadoc ... mmand.html


 
 Post subject: Re: Market if touched orders Post rating: 0   New post Posted: Thu 02 Jun, 2011, 10:22 

User rating: 0
Joined: Fri 27 May, 2011, 13:24
Posts: 4
Location: UA
Thank you!
I've understand. I mustn't provide slippage in the submitOrder method at all. (I'm only trying to use slippage equals 0, but it still turned into LIMIT order when triggered ). It's a littile bit inconvenient because I have to set stopLoss with another method call.
Anyway, it solves my problem.


 

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