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.

help need to place market order from client
 Post subject: help need to place market order from client Post rating: 0   New post Posted: Sat 04 Aug, 2018, 06:43 

User rating: 0
Joined: Mon 06 Jun, 2016, 06:38
Posts: 1
Location: IndiaIndia
public static void main(String[] args) throws Exception {
//get the instance of the IClient interface
client = ClientFactory.getDefaultInstance();

setSystemListener();
tryToConnect();
subscribeToInstruments();

//i need to place a market order here... how to get handle on iorder here?
//i have attached the file also


}


Attachments:
Main.java [5.39 KiB]
Downloaded 143 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: help need to place market order from client Post rating: 0   New post Posted: Mon 06 Aug, 2018, 12:47 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
    public static void main(String[] args) throws Exception {
        //get the instance of the IClient interface
        client = ClientFactory.getDefaultInstance();

        setSystemListener();
        tryToConnect();
        subscribeToInstruments();

        LOGGER.info("Starting strategy");
        client.startStrategy(new MyStrategy());
    }


In your strategy you program all logic responsible for placing/closing orders. Then you pass your strategy in startStrategy() method as a parameter.


 

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