Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

ORDER_FULLY_FILLED
 Post subject: ORDER_FULLY_FILLED Post rating: 0   New post Posted: Mon 24 Mar, 2014, 18:53 
User avatar

User rating: 0
Joined: Fri 07 Mar, 2014, 20:46
Posts: 14
Location: NetherlandsNetherlands
When i send PLACE_BID orders via the api and it fully fills them (on demo) i don't get the reason: ORDER_FULLY_FILLED

The reason is always empty. According to the diagram (https://www.dukascopy.com/wiki/files/Conditional%20Order%20States%20Diagram%2017.09.2012.pdf) is should list that reason.

work around
I can work around this by checking other things like amount etc so it is not a big deal.


 
 Post subject: Re: ORDER_FULLY_FILLED Post rating: 0   New post Posted: Mon 24 Mar, 2014, 18:57 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
The reason ORDER_FULLY_FILLED never arises on DEMO.


 
 Post subject: Re: ORDER_FULLY_FILLED Post rating: 0   New post Posted: Mon 24 Mar, 2014, 19:59 
User avatar

User rating: 0
Joined: Fri 07 Mar, 2014, 20:46
Posts: 14
Location: NetherlandsNetherlands
I suspected that :-)

But is it a bug or just designed to be like this.

in my opinion it should be there because it makes order handling easier tot test in Demo, otherwise you need to test in production.


 
 Post subject: Re: ORDER_FULLY_FILLED Post rating: 0   New post Posted: Wed 26 Mar, 2014, 10:40 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We could not replicate this with the following strategy:
package jforex.requests;

import java.util.Arrays;
import java.util.HashSet;

import com.dukascopy.api.IAccount;
import com.dukascopy.api.IBar;
import com.dukascopy.api.IConsole;
import com.dukascopy.api.IContext;
import com.dukascopy.api.IEngine;
import com.dukascopy.api.IEngine.OrderCommand;
import com.dukascopy.api.IHistory;
import com.dukascopy.api.IMessage;
import com.dukascopy.api.IStrategy;
import com.dukascopy.api.ITick;
import com.dukascopy.api.Instrument;
import com.dukascopy.api.JFException;
import com.dukascopy.api.Period;

public class BidOfferMessages implements IStrategy {

    private IEngine engine;
    private IHistory history;
    private IConsole console;
    private Instrument instrument = Instrument.EURUSD;

    @Override
    public void onStart(IContext context) throws JFException {
        engine = context.getEngine();
        history = context.getHistory();
        console = context.getConsole();
        context.setSubscribedInstruments(new HashSet<Instrument>(Arrays.asList(instrument)), true);
        ITick tick = history.getLastTick(instrument);
        engine.submitOrder("bid" + System.currentTimeMillis(), instrument, OrderCommand.PLACE_BID, 0.01, tick.getBid() - instrument.getPipValue());
        engine.submitOrder("offer" + System.currentTimeMillis(), instrument, OrderCommand.PLACE_OFFER, 0.01 ,tick.getAsk() + instrument.getPipValue());
    }

    @Override
    public void onTick(Instrument instrument, ITick tick) throws JFException {
    }

    @Override
    public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
    }

    @Override
    public void onMessage(IMessage message) throws JFException {
        if (message.getOrder() == null || message.getType() == IMessage.Type.NOTIFICATION) {
            return;
        }
        console.getInfo().println(message + " " + message.getReasons());
    }

    @Override
    public void onAccount(IAccount account) throws JFException {
    }

    @Override
    public void onStop() throws JFException {
    }

}

The ORDER_FULLY_FILLED is there. Could you please provide a concrete case?


 
 Post subject: Re: ORDER_FULLY_FILLED Post rating: 0   New post Posted: Wed 26 Mar, 2014, 14:57 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
hebasto wrote:
The reason ORDER_FULLY_FILLED never arises on DEMO.
I've reviewed my records: The reason ORDER_FULLY_FILLED never arises in Historical Tester. It works fine on DEMO for me too.


 
 Post subject: Re: ORDER_FULLY_FILLED Post rating: 0   New post Posted: Mon 31 Mar, 2014, 08:10 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We are going to fix this as soon as available.


 
 Post subject: Re: ORDER_FULLY_FILLED Post rating: 0   New post Posted: Mon 31 Mar, 2014, 08:13 
User avatar

User rating: 0
Joined: Fri 07 Mar, 2014, 20:46
Posts: 14
Location: NetherlandsNetherlands
Ok, tnx, i was not able to test your example/test case in the mean time.


 
 Post subject: Re: ORDER_FULLY_FILLED Post rating: 0   New post Posted: Thu 22 May, 2014, 13:31 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Fixed with JForex-API 2.9.10


 

Jump to:  

cron
  © 1998-2024 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