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.

Possible to Pull faster DOM snapshots?
 Post subject: Possible to Pull faster DOM snapshots? Post rating: 0   New post Posted: Tue 18 Sep, 2012, 02:09 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Two questions related to the frequency of onTick DOM snapshots:

1)
Instead of simply responding to IStrategy.onTick(Instrument instrument, ITick tick) is it possible to "pull" a fresh DOM snapshot programmatically, which will yield a fresh ITick object, in the LIVE environment?

So... some function like: ITick getTick(Instrument instrument) ? I wouldn't want cached data, but a fresh snapshot of the DOM.

2)
Secondly, I haven't tried this yet, is there any difference between standalone and JForex Strategy in the frequency of onTick callbacks? I'm looking for a higher rate of DOM snapshots; is there any way to achieve that?

Frankly, I was expecting a much higher rate of DOM snapshots than is provided, hence the questions. I ask because there is some possibility that a hosted Strategy within JForex *might* have different performance characteristics than a Standalone implementation.

By the way, if you are doing "expensive processing" in the onTick event, then consider capturing all of the information and queueing it to a fast producer/consumer type queue, which processes the instrument/tick data in another thread, while returning immediately from the onTickevents, so it doesn't hold up any incoming events on the the callback thread. If anyone needs help doing something like that, let me know. It's what I do, because I was expecting a much higher data rate for the Depth of Market snapshot callbacks.

Thanks!


 
 Post subject: Re: Possible to Pull faster DOM snapshots? Post rating: 0   New post Posted: Wed 19 Sep, 2012, 14:11 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
please elaborate what do you mean by "onTick DOM snapshot".


 
 Post subject: Re: Possible to Pull faster DOM snapshots? Post rating: 0   New post Posted: Fri 21 Sep, 2012, 17:32 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
API Support wrote:
please elaborate what do you mean by "onTick DOM snapshot".


I'm sorry if I am not being clear. I am just saying that the full Depth of Market "snapshot" is available in the onTick event by using this code:

   final public void onTick(final Instrument instrument, final ITick tick) throws JFException {
      if (!instrument.equals(selectedInstrument)) return;
      // capture everything, queue it and return
      final TickPacket tickPacket = new TickPacket(instrument, tick.getBids(), tick.getBidVolumes(),
            tick.getAsks(), tick.getAskVolumes());
      tickProcessor.add(tickPacket); // queue it up and release this thread
      return;
   }
   


The Depth of Market information is obtained from the ITick object provided.

Is this the only way to obtain the Depth of Market (DOM) information? Each time the onTick event occurs, it provides a "snapshot" of the DOM. This information is not updated very often, and many retail systems such as JForex "throttle" DOM updates to a low data rate so the network is not overwhelmed. I can understand that.

Thanks for helping me to understand it.

I WAS TOLD BY SOMEONE WHO HAD USED DUKASCOPY SYSTEMS IN THE PAST, that previously, more than 10 levels were available in the Depth of Market. Then a decision was made to reduce the DOM to 10 Levels. Is this true? It would be useful to have more than 10 levels in the Depth of Market if it is available from any source from the data feed.


 

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