Gamestudio Links
Zorro Links
Newest Posts
Bug in the beta version
by jcl. 09/26/22 08:20
Renko bar and free version of Zorro
by jcl. 09/26/22 08:18
Multicurrency Currency Strength
by JJ95. 09/22/22 18:39
Interactive brokers demo trade test
by AndrewAMD. 09/22/22 17:14
Check Lookback on a per-asset basis
by AndrewAMD. 09/22/22 13:41
How's 3DGS in 2022?
by Cyndanera. 09/22/22 01:01
AUM Magazine
Latest Screens
DEAD TASTE
Tactics of World War I
Hecknex World
Scheherazade's Journey
Who's Online Now
5 registered members (AndrewAMD, Quad, ozgur, Atila_Firmino, KhodeService), 413 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lianhuaahua, sereinsand, Cyndanera, Atila_Firmino, mircomm
18847 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Multicurrency Currency Strength [Re: JJ95] #486727
09/22/22 17:22
09/22/22 17:22
Joined: Sep 2022
Posts: 11
J
JJ95 Offline OP
Newbie
JJ95  Offline OP
Newbie
J

Joined: Sep 2022
Posts: 11
I see what you are saying.

I would like to ask a question reagarding the ccyIdx function found in the indicator source code:

Quote

char CNames[128]; // MAXCURRENCIES * 4
int NumCurrencies = 0;
char* CURRENCY_NAME = "EUR";

ccyIdx(CURRENCY_NAME )


If we placed the function in a live example:

Inside the parenthesis, we are expecting to pass only 1 currency name. If we pass a currency such as EUR, the function will add EUR0 to CNames, then add 1 to NumCurrencies. If we wanted to add another currency, we will have to call the function again and pass another currency. Am I correct?

Thank you so much for your earliest replies

Re: Multicurrency Currency Strength [Re: JJ95] #486728
09/22/22 18:10
09/22/22 18:10
Joined: Feb 2017
Posts: 1,554
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,554
Chicago
Let me refer you to the documentation:
https://zorro-project.com/manual/en/ccy.htm

Notice that ccyIdx() is not documented. This is intentional. The script writer is not supposed to access it, since it is a helper function designed for the documented functions to use from Zorro's backend.

Really, the source code for ccyIdx is for your reference only. It's already compiled.

Scroll down to the bottom of the page to see an excellent example of how to use the currency strength functions from the script-side. It loops through your forex assets (pairs like "EUR/USD"), and it generates strength values for all currencies (like "USD" or "EUR"). Then it selects a strongest and weakest pair based on those values. Then it goes long on the strongest pair and short on the weakest pair, given a minimum strength threshold value is crossed.

Re: Multicurrency Currency Strength [Re: AndrewAMD] #486729
09/22/22 18:39
09/22/22 18:39
Joined: Sep 2022
Posts: 11
J
JJ95 Offline OP
Newbie
JJ95  Offline OP
Newbie
J

Joined: Sep 2022
Posts: 11
Understood.

I will skip it and proceed to understanding ccySet function.

Page 3 of 3 1 2 3

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