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.

Level 2 with "odd" data
 Post subject: Level 2 with "odd" data Post rating: 0   New post Posted: Tue 26 Aug, 2008, 20:37 

User rating: 0
Joined: Tue 26 Aug, 2008, 20:26
Posts: 3
public void onTick(Instrument instrument, ITick tick) throws JFException {
int bPriceCnt = 0;
int aPriceCnt = 0;
int aVolCnt = 0;
int bVolCnt = 0;
double[] bPrices = tick.getBids();
double[] aPrices = tick.getAsks();
double[] bVol = tick.getBidVolumes();
double[] aVol = tick.getAskVolumes();

String Vols;

for ( double i : bVol )   { bVolTotal += i; bVolCnt += 1;}
for ( double i : aVol )   { Vols += "BidVol = " + i/1000000 + "\n";aVolTotal += i; aVolCnt += 1;}
for ( double i : aPrices ) { aPriceCnt += 1;}
for ( double i : bPrices ) { bPriceCnt += 1;}

// print Vols here
}


Using the above code I randomly get 1 extra entry than is shown in the lvl 2 data on the platform. Specificualy with the EUR/USD these extras have 1.25 volume entry for the Ask and 100 volume for the Bid. These seem to be random and the inconsistantcy is a bit troubling. $100,000,000 showing up randomly on the lvl 2 data :shock:

Any ideas?

Edit: had bid/ask reversed


 
 Post subject: Re: Level 2 with "odd" data Post rating: 0   New post Posted: Tue 26 Aug, 2008, 23:47 

User rating: 0
Joined: Tue 26 Aug, 2008, 20:26
Posts: 3
I may have "found" the problem... for eurusd the price is currently roughly 1.4637. The 100 Lot ($100,000,000) bid is at 1.445. Is it possible this is ligitmate liquidity way out there that the JForex GUI is filtering because the price is beyond a constraint?

The Ask is at 1.4888, equally not represented by the GUI's Level 2 summary.

Is this the answer or is there something else going on?

It still appears randomly in each tick.


 
 Post subject: Re: Level 2 with "odd" data Post rating: 0   New post Posted: Wed 27 Aug, 2008, 11:02 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You are right.

The Dukascopy Java Platform displays the first 10 best offers. But actually, there might be more than 10 offers.
The API is providing full access to the Dukascopy Market Depth.
There is an example of service, providing the full Market Depth: https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=7&t=156

Anyway, it is a very rare situation when someone put a BID \ OFFER order in Market Depth out of real Market price.
Usually it is used as an additional control in custom strategy.


 

Jump to:  

  © 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