Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Referencing pairs to trade others #460995
07/22/16 10:38
07/22/16 10:38
Joined: Jul 2016
Posts: 1
Sydney
J
Jettison Offline OP
Guest
Jettison  Offline OP
Guest
J

Joined: Jul 2016
Posts: 1
Sydney
Hi all,

I am trying to create a strategy that references certain pairs, and then based on that information, trade others appropriately. I have done a bit of digging through the manual and found this for basket trading and synthetic assets, but I'm not sure that it is what I'm after.

var priceUSD()
{
var p = 0;
asset("GBP/USD"); p += price();
asset("AUD/USD"); p += price();
asset("EUR/USD"); p += price();
return p;
}

The problem I am having is that I'm not sure how to differentiate in my script how to simply reference a pair without actually trading it.

I am very new to coding in general, however please be as brutal as necessary.

Any help is much appreciated.

Re: Referencing pairs to trade others [Re: Jettison] #461005
07/22/16 15:04
07/22/16 15:04
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Your example is correct. For referencing a pair, just call asset().

Re: Referencing pairs to trade others [Re: jcl] #461074
07/24/16 11:37
07/24/16 11:37
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
But don't forget to switch the asset back to the one you want to trade once you're done with your referencing!

And welcome to the forums!


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1