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.

WIKI - Get full Market Depth
 Post subject: WIKI - Get full Market Depth Post rating: 0   New post Posted: Mon 20 Jul, 2015, 09:06 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
Hello support,

in Wiki article „Get full Market Depth“ https://www.dukascopy.com/wiki/#Get_full_Market_Depth

is text „A code displays a full Market Depth (not "the 10 best offers" filtration).“.

But Market Depth shows only max. 10 levels.

PS: Java file would be useful.


 
 Post subject: Re: WIKI - Get full Market Depth Post rating: 0   New post Posted: Wed 22 Jul, 2015, 11:20 
User avatar

User rating: 0
Joined: Fri 04 Apr, 2014, 09:45
Posts: 1
Location: PortugalPortugal
Hello Lifon,

I have the same problem...i hope the support explain what the problem.

When you look upon the total market depth of JForex never never never equal the sum of the 10 levels, so there are orders outside of 10 levels but with programming they are not visible.

The Dukascopy support is good so i'm confident that will be explained and resolved :)


 
 Post subject: Re: WIKI - Get full Market Depth Post rating: 0   New post Posted: Thu 30 Jul, 2015, 10:45 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
A better description of the strategy could be that it shows 10 top volume levels in market.
Market depth is not equal to the sum of these levels because there are other more distant levels that have volume but are not shown in the list.


 
 Post subject: Re: WIKI - Get full Market Depth Post rating: 0   New post Posted: Fri 31 Jul, 2015, 07:02 
User avatar

User rating: 7
Joined: Thu 05 Sep, 2013, 12:43
Posts: 56
Location: Russian Federation, Tomsk
Dear Support,
How to get more than 10 levels of market depth? Is it able with JForex API?
Is it possible to get market depth with FIX API? Does it has same limit 10 levels or more?


 
 Post subject: Re: WIKI - Get full Market Depth Post rating: 0   New post Posted: Mon 03 Aug, 2015, 13:19 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Market depth can be received with ITick.getBidVolumes().
In order to receive 10 volumes instead of just 1 volume value strategy needs to subscribe to an instrument:
        Set<Instrument> instruments = new HashSet<Instrument>();
        instruments.add(Instrument.EURSEK);
        context.setSubscribedInstruments(instruments, true);


 
 Post subject: Re: WIKI - Get full Market Depth Post rating: 0   New post Posted: Mon 03 Aug, 2015, 13:32 
User avatar

User rating: 7
Joined: Thu 05 Sep, 2013, 12:43
Posts: 56
Location: Russian Federation, Tomsk
API Support wrote:
Market depth can be received with ITick.getBidVolumes().
In order to receive 10 volumes instead of just 1 volume value strategy needs to subscribe to an instrument:
        Set<Instrument> instruments = new HashSet<Instrument>();
        instruments.add(Instrument.EURSEK);
        context.setSubscribedInstruments(instruments, true);


Dear Support,
please read my question again: I need to get more than 10 items in market depth.
I tested this code you offered me
public void onTick(Instrument instrument, ITick tick) throws JFException {
        if (instrument == Instrument.EURUSD) {
            int count = tick.getBidVolumes().length;
            console.getOut().println(count);  // count is 10 every tick but I need more
        }
    }

and it give only 10 items limit. How to get more?


 
 Post subject: Re: WIKI - Get full Market Depth Post rating: 0   New post Posted: Mon 03 Aug, 2015, 14:19 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
It is not possible to get more than 10 levels.


 
 Post subject: Re: WIKI - Get full Market Depth Post rating: 0   New post Posted: Wed 23 Dec, 2015, 11:07 
User avatar

User rating: 0
Joined: Wed 23 Dec, 2015, 10:38
Posts: 1
The Market Depth window in Jforex contains a Bid and a Ask corresponding to ITick.getTotalBidVolume and ITick.getTotalAskVolume, e.g.

-------------Market Depth-------------
239.M/1.09198 1.0920.7/262.1M

These are some kind of average Bid and Ask. I did not found a documentation.
How they exactly are calculated and/or how we you acess them with API?


 

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