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.

Trading - strategy waiting for tick to slow
 Post subject: Trading - strategy waiting for tick to slow Post rating: 0   New post Posted: Mon 08 Nov, 2010, 20:23 

User rating: 0
Joined: Fri 16 Jul, 2010, 00:26
Posts: 6
Hi,

I have a GUI as a strategy that sends orders as you click on the designates buttons on the GUI depending on the order. Unfortunately strategies can be run the fastest as tick by tick. That causes my orders to wait the next tick until they are executed.

I'm wondering if there is a workaround for this problem in a strategy or any other solution that would send orders instant? Or can your source code be modified for jforex to add additional options to the platform from my side.

Naturally this was designed to automate different orders as they are logically processed but initial entry to the market will "lag" as stated above.


 
 Post subject: Re: Trading - strategy waiting for tick to slow Post rating: 0   New post Posted: Tue 09 Nov, 2010, 14:06 

User rating: 0
Joined: Tue 27 Jul, 2010, 20:57
Posts: 49
I suggest you execute your order when the button is pressed.. lol.

I do it inside the mouse listener, e.g. like so:
Syntax: [ Download ] [ Hide ]
  1.     Future<IOrder> future = context.executeTask(new Callable<IOrder>(){ 
  2.       public IOrder call(){ 
  3.         try{ 
  4.           String label = "B" + dateFormat.format(new Date()); 
  5.           return engine.submitOrder(label, Instrument.EURUSD, IEngine.OrderCommand.BUY, amount, 0, slippage); 
  6.         } 
  7.         catch(JFException e){ 
  8.           cout.println(e.getMessage()); 
  9.           return null; 
  10.         } 
  11.       } 
  12.     }); 


 

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