Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

ORDER_FULLY_FILLED
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=16&t=50967
Page 1 of 1

Author:  tabacco [ Mon 24 Mar, 2014, 18:53 ]
Post subject:  ORDER_FULLY_FILLED

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.

Author:  hebasto [ Mon 24 Mar, 2014, 18:57 ]
Post subject:  Re: ORDER_FULLY_FILLED

The reason ORDER_FULLY_FILLED never arises on DEMO.

Author:  tabacco [ Mon 24 Mar, 2014, 19:59 ]
Post subject:  Re: ORDER_FULLY_FILLED

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.

Author:  API Support [ Wed 26 Mar, 2014, 10:40 ]
Post subject:  Re: ORDER_FULLY_FILLED

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?

Author:  hebasto [ Wed 26 Mar, 2014, 14:57 ]
Post subject:  Re: ORDER_FULLY_FILLED

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.

Author:  API Support [ Mon 31 Mar, 2014, 08:10 ]
Post subject:  Re: ORDER_FULLY_FILLED

We are going to fix this as soon as available.

Author:  tabacco [ Mon 31 Mar, 2014, 08:13 ]
Post subject:  Re: ORDER_FULLY_FILLED

Ok, tnx, i was not able to test your example/test case in the mean time.

Author:  API Support [ Thu 22 May, 2014, 13:31 ]
Post subject:  Re: ORDER_FULLY_FILLED

Fixed with JForex-API 2.9.10

  Page 1 of 1