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.

Receiving ask volumes data in indicator
 Post subject: Receiving ask volumes data in indicator Post rating: 0   New post Posted: Tue 28 Jan, 2014, 21:23 

User rating: 0
Joined: Sun 23 Oct, 2011, 22:41
Posts: 24
Location: Ukraine,
Hello dear support.

I would like to create an indicator that indicates best ask volumes (via histogram).
When I receive input data array (PRICE type) I can access to such fields: open, close, high, low, volume (source: https://www.dukascopy.com/wiki/#Indicator_API:_InputParameterInfo). The volume field contains only best bid volumes.
Is there a way to receive in indicator full market depth information or best ask volumes?


 
 Post subject: Re: Receiving ask volumes data in indicator Post rating: 0   New post Posted: Wed 29 Jan, 2014, 09:20 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Indicators receive only the best Bid/Ask price. You can only receive greater depth in strategy real-time run in the IStrategy.onTick method.


 
 Post subject: Re: Receiving ask volumes data in indicator Post rating: 0   New post Posted: Wed 29 Jan, 2014, 09:47 

User rating: 0
Joined: Sun 23 Oct, 2011, 22:41
Posts: 24
Location: Ukraine,
API Support wrote:
Indicators receive only the best Bid/Ask price.


Did you mean Bid/Ask volumes?

As I understand, I receive bid or ask volumes (in volume field) in indicator depends on which kind of price was selected on the chart window. Am I right?
Or I can manually choose (in the indicator's code) which volume (bid or ask) I'll receive in indicator?


 
 Post subject: Re: Receiving ask volumes data in indicator Post rating: 0   New post Posted: Wed 29 Jan, 2014, 10:13 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
BogdanIvaniuk wrote:
Did you mean Bid/Ask volumes?
This applies both to prices and volumes.
BogdanIvaniuk wrote:
As I understand, I receive bid or ask volumes (in volume field) in indicator depends on which kind of price was selected on the chart window. Am I right?
Yes.
BogdanIvaniuk wrote:
Or I can manually choose (in the indicator's code) which volume (bid or ask) I'll receive in indicator?
You can set to the input parameter which offer side you want to receive, for instance:
             new InputParameterInfo("Input data Ask", InputParameterInfo.Type.PRICE){{                 
                 setOfferSide(OfferSide.ASK) ;
             }}


 
 Post subject: Re: Receiving ask volumes data in indicator Post rating: 0   New post Posted: Wed 29 Jan, 2014, 11:16 

User rating: 0
Joined: Sun 23 Oct, 2011, 22:41
Posts: 24
Location: Ukraine,
API Support wrote:
You can set to the input parameter which offer side you want to receive


That's exactly what I needed.

Thank you for your answers and help. Issue was fixed.


 

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