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.

onTick - tick should be not dropped
 Post subject: onTick - tick should be not dropped Post rating: 0   New post Posted: Thu 29 May, 2014, 08:17 

User rating: 3
Joined: Fri 11 Oct, 2013, 13:49
Posts: 34
Hello,

https://www.dukascopy.com/wiki/#onTick_execution_policy

It's should be not dropped - but when tick is received from server should be tick.setLocalTime(System.currentMiliseconds());
because strategies use all ticks, when ticks are dropper order can't be submited in some cases

then

@Override
public void onTick(Instrument instrument, ITick tick) throws JFException {
if (tick.getLocalTime() > System.currentMiliseconds() - 100) {
//order low latency
}

//or

if (tick.getLocalTime() > System.currentMiliseconds() - 500) {
//order more latency
}

}


regards


 
 Post subject: Re: onTick - tick should be not dropped Post rating: 0   New post Posted: Thu 29 May, 2014, 17:12 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
To prevent dropping of ticks due to prolonged execution of your code in the strategy thread, consider doing prolonged executions in other threads.


 

Jump to:  

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