Dukascopy
 
 
Wiki JStore Search Login

a strategy with two currency pairs
 Post subject: a strategy with two currency pairs Post rating: 0   New post Posted: Mon 04 Jan, 2016, 21:41 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Dears,

should not this strategy open only two positions? Instead, it is opening positions every tick.

Thanks for your help,
Antony


Attachments:
File comment: opening unlimited positions
tradingTwoMarkets.vfs [46.79 KiB]
Downloaded 276 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: a strategy with two currency pairs Post rating: 1   New post Posted: Thu 07 Jan, 2016, 12:30 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

What makes you think that it should trade only 2 positions ?
If you are referring to the number of "Pending Open" blocks then you're completely wrong: These commands get executed every-time the foregoing conditions are verified and as you used Tick start, these conditions will be checked every tick price.
If you need only 2 positions, then you might need to specify it in the IF condition that uses the number of open positions.


Thanks


 
 Post subject: Re: a strategy with two currency pairs Post rating: 0   New post Posted: Thu 07 Jan, 2016, 12:49 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Thanks Amine,

so I did the change, bur no improvement (pls see the attachment).

Or am I missing something more fundamental?

Regards,
Antony


Attachments:
tradingTwoMarkets_V3.vfs [46.79 KiB]
Downloaded 252 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: a strategy with two currency pairs Post rating: 1   New post Posted: Fri 08 Jan, 2016, 16:06 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

Please check the attached version. Your strategy trades on candle based, please consider the default trading period in your condition as it is useless to plug it to Ontick start point.

Cheers


Attachments:
tradingTwoMarkets_V3.vfs [53.46 KiB]
Downloaded 256 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: a strategy with two currency pairs Post rating: 0   New post Posted: Fri 08 Jan, 2016, 20:44 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Hi Amine,

appreciate your attention.

Please advice how to calculate sum of all opened positions on different markets?

Lets use the above discussed case as an example:
- I need a box recognising ALL OPENED POSITIONS (on both traded markets)
- if sum off all opened positions is only one (because the other got hit by SL), than do xxx

Regards,
Antony


 
 Post subject: Re: a strategy with two currency pairs Post rating: 0   New post Posted: Wed 20 Jan, 2016, 16:19 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

Here is a draft showing how you should use the variable "Position Amount" that retrieves dynamically the total number of all open positions on any currency pair traded.
This is indeed a simple example for learning purpose and you may need to adjust it upon your needs.
Let me know your comments ..

Cheers


Attachments:
OpenPosMultiCurrencies.vfs [28.14 KiB]
Downloaded 285 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: a strategy with two currency pairs Post rating: 0   New post Posted: Thu 28 Jan, 2016, 18:36 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Hi Amine,

than you for your feedback. I have the same results.

But what to do, if (on given example) you wish to have:

ONE position on AUDJPY
TWO positions on GBPAUD

How to filter that?

Or in another words, how to filtrate 'different position amount' on 'different markets'?

Thanks,
Antony


 
 Post subject: Re: a strategy with two currency pairs Post rating: 1   New post Posted: Fri 29 Jan, 2016, 16:26 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

I see..
In this case a counter should be implemented and will be incremented each time a position is submitted and filled and therefore you'll get the count result which corresponds to the number of open positions per currency pair. Afterwards, you can set up the limit for each counter.
Check the attached example..

Cheers


Attachments:
OpenPosMultiCurrenciesV0.vfs [31.54 KiB]
Downloaded 255 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: a strategy with two currency pairs Post rating: 1   New post Posted: Mon 01 Feb, 2016, 17:22 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi;

We found that the standard need of getting position's information per traded instrument quite useful and requires a dedicated block. Thus, we're analyzing the feasibility of implementing a new block that will perform this job to avoid using several conditions to do a simple task.
We'll keep you informed about the outcome.

Cheers!


 
 Post subject: Re: a strategy with two currency pairs Post rating: 0   New post Posted: Mon 01 Feb, 2016, 19:05 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Looking forward!

Good luck with that one.


 

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