|
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.
Market Depth JForex API |
[swfxPadawan]
|
Post subject: Market Depth JForex API |
Post rating: 0
|
Posted: Thu 03 Feb, 2011, 02:54
|
|
User rating: 0
Joined: Tue 01 Feb, 2011, 23:40 Posts: 5
|
In the JForex GUI, on the left side middle, there is a Market Depth section with 6 values colored gray, red, green, gray, black and black. Below this is a section that I understand to be the best 10 bid volumes, bids, asks, and ask volumes.
1) What are the 6 values called? 2) What do they mean? 3) What are the JForex API calls to obtain them in code? 4) How do you compute the red and green values (if they are computed)?
Regards.
|
|
|
|
 |
API Support
|
Post subject: Re: Market Depth JForex API |
Post rating: 0
|
Posted: Fri 04 Feb, 2011, 15:33
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
With the gray color are the total volumes (not only 10 shown in panel), red is the weighted average bid, green - weighted average ask You can get total volumes by calling ITick.getTotalAskVolume and ITick.getTotalBidVolume, but only for the tick that comes as a parameter in onTick method. Historical ticks doesn't have this information. Red and green values are waighted averages - https://en.wikipedia.org/wiki/Weighted_mean. You multiply prices with corresponding volumes, sum them and divide by the sum of the volumes
|
|
|
|
 |
dreamtheater
|
Post subject: Re: Market Depth JForex API |
Post rating: 0
|
Posted: Fri 04 Feb, 2011, 17:29
|
|
User rating: 1
Joined: Mon 23 May, 2011, 07:52 Posts: 57 Location: Bulgaria,
|
I really don't see any colored values in the Market Depth section. Where exactly do you see that?
|
|
|
|
 |
[swfxPadawan]
|
Post subject: Re: Market Depth JForex API |
Post rating: 0
|
Posted: Fri 04 Feb, 2011, 22:29
|
|
User rating: 0
Joined: Tue 01 Feb, 2011, 23:40 Posts: 5
|
@Support Thanks. That is what I figured. I assume that the black values are the fifth decimal of the weighted average bid/ask? When I posted my question, they were on a new line for 4 decimal per pip instruments, but now I notice it is the third decimal for 2 decimal per pip instruments. Can we obtain the weighted average bid/ask via the API? I only see the 10 best prices and volumes when using the API. Also, this code https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=7&t=156 still only shows the top 10, even though it claims to show full market depth. @dreamtheater See the attachment and reread my first 2 sentences of the original post. I use the JForex GUI https://www.dukascopy.com/client/demo/jclient/jforex.jnlp
Attachments: |
Screen shot 2011-02-04 at 3.20.31 PM.png [15.32 KiB]
Downloaded 815 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
API Support
|
Post subject: Re: Market Depth JForex API |
Post rating: 0
|
Posted: Mon 07 Feb, 2011, 14:54
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
swfxPadawan wrote: I assume that the black values are the fifth decimal of the weighted average bid/ask? Yes, that's correct. They are usually in one line :/ swfxPadawan wrote: Can we obtain the weighted average bid/ask via the API? I only see the 10 best prices and volumes when using the API. Also, this code viewtopic.php?f=7&t=156 still only shows the top 10, even though it claims to show full market depth. Now it's only top 10. Minimal price change was reduced to 0.1 pip and market depth can be very big for some instruments. To reduce internet traffic only top 10 places are sent.
|
|
|
|
 |
[42adb]
|
Post subject: Re: Market Depth JForex API |
Post rating: 1
|
Posted: Wed 30 Mar, 2011, 20:29
|
|
User rating: 1
Joined: Thu 24 Feb, 2011, 19:21 Posts: 6
|
Support wrote: swfxPadawan wrote: I assume that the black values are the fifth decimal of the weighted average bid/ask? Yes, that's correct. They are usually in one line :/ swfxPadawan wrote: Can we obtain the weighted average bid/ask via the API? I only see the 10 best prices and volumes when using the API. Also, this code viewtopic.php?f=7&t=156 still only shows the top 10, even though it claims to show full market depth. Now it's only top 10. Minimal price change was reduced to 0.1 pip and market depth can be very big for some instruments. To reduce internet traffic only top 10 places are sent. So basically now it shows market "depth" of 2 pips  . How about some aggregating, say 5 or 10 pips per level so that at least 50 or 100 pips of market is covered. That way you still only send 10 levels but at least it's useful data because MD of 2 pips is not all that useful... edit: Also, if the problem is the quantity of data sent, only send updates for levels that actually change. If you aggregate intelligently (at least per pip or more instead of 0.1 pip) and only send delta updates with a proper granularity (ie. only send updates if volume changes for a full lot instead of 0.01 lots, so show 1, 2, 100 etc but not 1.01->1.02) it should not be a problem at all. So instead of showing market depth with a granularity of 0.01 lots and per 0.1 pip, show it per full lots and aggregate per full pip or more, in other words send updates only for levels that actually changed and only send updates for significant changes (0.1 pip and 0.01 lots in a market that moves 150+ pips and trades 2000000 lots per day isn't significant, so if you send whole market depth updates with a granularity like that, per tick, that's a lot of levels, a lot of updates and a lot of bandwidth - if however you send updates for individual 1/2/5/10 pip blocks that changed and only for changes of more than 1/5/10 lots that's much more manageable). You can even dynamically adjust this granularity depending on market activity and parameters (so a thin flat market would have different update parameters). This way you can show *full* market depth without bandwidth issues. edit2: Also, bid/ask market depth should probably be on both sides of the current price instead of bids on one side and offers on the other 
|
|
|
|
 |
f451
|
Post subject: Re: Market Depth JForex API |
Post rating: 0
|
Posted: Wed 13 Feb, 2013, 01:11
|
|
User rating: 8
Joined: Tue 25 Oct, 2011, 23:02 Posts: 74 Location: Australia, Melbourne
|
[42adb] wrote: Support wrote: swfxPadawan wrote: I assume that the black values are the fifth decimal of the weighted average bid/ask? Yes, that's correct. They are usually in one line :/ swfxPadawan wrote: Can we obtain the weighted average bid/ask via the API? I only see the 10 best prices and volumes when using the API. Also, this code viewtopic.php?f=7&t=156 still only shows the top 10, even though it claims to show full market depth. Now it's only top 10. Minimal price change was reduced to 0.1 pip and market depth can be very big for some instruments. To reduce internet traffic only top 10 places are sent. So basically now it shows market "depth" of 2 pips  . How about some aggregating, say 5 or 10 pips per level so that at least 50 or 100 pips of market is covered. That way you still only send 10 levels but at least it's useful data because MD of 2 pips is not all that useful... edit: Also, if the problem is the quantity of data sent, only send updates for levels that actually change. If you aggregate intelligently (at least per pip or more instead of 0.1 pip) and only send delta updates with a proper granularity (ie. only send updates if volume changes for a full lot instead of 0.01 lots, so show 1, 2, 100 etc but not 1.01->1.02) it should not be a problem at all. So instead of showing market depth with a granularity of 0.01 lots and per 0.1 pip, show it per full lots and aggregate per full pip or more, in other words send updates only for levels that actually changed and only send updates for significant changes (0.1 pip and 0.01 lots in a market that moves 150+ pips and trades 2000000 lots per day isn't significant, so if you send whole market depth updates with a granularity like that, per tick, that's a lot of levels, a lot of updates and a lot of bandwidth - if however you send updates for individual 1/2/5/10 pip blocks that changed and only for changes of more than 1/5/10 lots that's much more manageable). You can even dynamically adjust this granularity depending on market activity and parameters (so a thin flat market would have different update parameters). This way you can show *full* market depth without bandwidth issues. edit2: Also, bid/ask market depth should probably be on both sides of the current price instead of bids on one side and offers on the other  Dear Support, Have you given any thought to implementing these excellent suggestions?
|
|
|
|
 |
API Support
|
Post subject: Re: Market Depth JForex API |
Post rating: 0
|
Posted: Wed 13 Feb, 2013, 16:44
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
hyperscalper
|
Post subject: Re: Market Depth JForex API |
Post rating: 0
|
Posted: Wed 13 Feb, 2013, 17:50
|
|
User rating: 98
Joined: Mon 23 Jul, 2012, 02:02 Posts: 656 Location: United States, Durham, NC
|
I have requested an "extended Market Depth" which would be available only to API users, and which would provide more than 10 elements per side.
My request would not impact "normal" users, but would enable API users who need additional depth information to explicitly request feed access more than 10 levels. Perhaps 20 or 30 quote elements on each side of the Market Depth.
My request is not for "infinite" depth. Far from it. I'm asking only for perhaps 2 or 3 times the depth information we are currently able to obtain. No more, but just wider than the typical 1 pip which we usually see today. (If there are no missing quote levels today, then we see only 1 pip of market depth as the poster observed. Obviously if the depth is "sparse" some quotes will be further away.)
My request would not impact the JForex platform.
Please consider this as an API extension, but make the "default" behavior exactly as it is today, so that no existing IStrategy modules would break, and JForex would not be impacted either.
HyperScalper
|
|
|
|
 |
API Support
|
Post subject: Re: Market Depth JForex API |
Post rating: 0
|
Posted: Mon 18 Feb, 2013, 13:31
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
It would be a huge performance overflow on the servers.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|