Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,633 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Creating series of spread with / operation #463889
01/03/17 09:10
01/03/17 09:10
Joined: Apr 2013
Posts: 35
J
Joaquin Offline OP
Newbie
Joaquin  Offline OP
Newbie
J

Joined: Apr 2013
Posts: 35
Hi again,
I've found something weird and I don't know the reason. According to the documentation, one can create artificial series variables of different assets or of different series variables just by doing something like

vars spread = series(asset1[0] + asset2[0]);

Being asset1 and asset2 series of closing prices of 2 different assets.
So far so good. But what I was trying to do was

vars pairsRatio = series(asset1[0] / asset2[0]);

And that operation always gives 1 as a result.
It is not a big problem, as I have seen that

vars pairsRatio = series(asset1[0] * asset2[0]);

works correctly, so with this operation I can get what I was looking for. Just wanted to ask if this behavior with the / operation is normal or not...

Thanks again jcl!

Last edited by Joaquin; 01/03/17 09:11.
Re: Creating series of spread with / operation [Re: Joaquin] #463908
01/05/17 12:11
01/05/17 12:11
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
No, series(x/y) is not always 1 except when x and y are always equal. So check the values of asset1 and asset2.

Re: Creating series of spread with / operation [Re: jcl] #463949
01/09/17 10:00
01/09/17 10:00
Joined: Apr 2013
Posts: 35
J
Joaquin Offline OP
Newbie
Joaquin  Offline OP
Newbie
J

Joined: Apr 2013
Posts: 35
LOL . My fault, x and y were the same... Sorry!


Moderated by  Petra 

Gamestudio download | 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