Dukascopy
 
 
Wiki JStore Search Login

Separating bid/ask volumes for candles
 Post subject: Separating bid/ask volumes for candles Post rating: 0   New post Posted: Sun 02 Jun, 2013, 22:28 

User rating: 0
Joined: Wed 08 May, 2013, 23:20
Posts: 6
Hi,

I want to sum x periods worth of bid and ask volumes separately. I see that last_candle can get the data for bid and ask volumes separate, but having trouble adding to a loop function as current candle only returns total volume.

More specifically I want to sum say the previous 4, 10 second candle's bid and ask volumes separately, and compare their sum together. I think it might be possible but a little unsure on how to code it creatively, so some guidance would be great!

Thanks

Ben


 
 Post subject: Re: Separating bid/ask volumes for candles Post rating: 0   New post Posted: Mon 03 Jun, 2013, 07:50 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Maybe you could post the piece of strategy already written?


 
 Post subject: Re: Separating bid/ask volumes for candles Post rating: 0   New post Posted: Mon 03 Jun, 2013, 09:54 

User rating: 0
Joined: Wed 08 May, 2013, 23:20
Posts: 6
Sure, here is the code I am using, and the problem I am facing:

last_candle_bid and ask don't loop.

on_candle volume doesnt separate bid and ask volumes.

As always thanks for your help!!


Attachments:
ten_second_bid_ask_ma.vfs [23.57 KiB]
Downloaded 264 times
Untitled.png [184.52 KiB]
Downloaded 386 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.
 
 Post subject: Re: Separating bid/ask volumes for candles Post rating: 0   New post Posted: Tue 04 Jun, 2013, 10:16 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Hello

Here is a strategy that calculates the cumulated volumes for the last 4 10 minutes candles for ASK and BID separatly.

Than it compares them.

And if volume ASK > volume BID than it opens a LONG position, otherwise it opens a short position.

Than it rings an alert and STOP the strategy.

The screenshots are in the nexy post.


Attachments:
Capture.JPG [127.04 KiB]
Downloaded 306 times
Volume_ASK_BID.vfs [36.82 KiB]
Downloaded 303 times
Capture.JPG [127.04 KiB]
Downloaded 291 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.
 
 Post subject: Re: Separating bid/ask volumes for candles Post rating: 1   New post Posted: Tue 04 Jun, 2013, 10:21 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Here are the screenshots:

Image Image


Attachments:
Capture.JPG [127.04 KiB]
Downloaded 517 times
Capture2.JPG [18.44 KiB]
Downloaded 478 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.
 
 Post subject: Re: Separating bid/ask volumes for candles Post rating: 0   New post Posted: Tue 04 Jun, 2013, 19:46 

User rating: 0
Joined: Wed 08 May, 2013, 23:20
Posts: 6
Awesome, thanks for the code!

Ben


 
 Post subject: Re: Separating bid/ask volumes for candles Post rating: 0   New post Posted: Wed 05 Jun, 2013, 07:38 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
You are welcome

Do not hesitate to come back.


 

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