Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Ayumi, Akow, AndrewAMD), 1,505 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Beginner question : vars and series #460807
07/15/16 15:11
07/15/16 15:11
Joined: Jun 2016
Posts: 2
france
J
jc45 Offline OP
Guest
jc45  Offline OP
Guest
J

Joined: Jun 2016
Posts: 2
france
Hello everybody,
I'm a beginner and I'm in trouble with this simple code :

function run()
{
BarPeriod = 1440;
set(PRELOAD);
LookBack = 250;

asset("vxmt");
vars priceVXMT = series(priceClose());
asset("vxv");
vars priceVXV = series(priceClose());

vars ratio = series(priceVXV/priceVXMT);
vars ratioSMA = series(SMA(ratio,20));

}

error in line 16:
Syntax error : wrong type DIV:POINTER:POINTER:POINTER
<vars ratio = series(priceVXV/priceVXMT);>

Any idea ? Any help is welcome.
Thank's in advance !
JC

Re: Beginner question : vars and series [Re: jc45] #460809
07/15/16 16:18
07/15/16 16:18
Joined: Apr 2016
Posts: 5
W
wingt Offline
Newbie
wingt  Offline
Newbie
W

Joined: Apr 2016
Posts: 5
try this:
vars ratio = series(priceVXV[0]/priceVXMT[0]);

Re: Beginner question : vars and series [Re: wingt] #460811
07/15/16 16:48
07/15/16 16:48
Joined: Jun 2016
Posts: 2
france
J
jc45 Offline OP
Guest
jc45  Offline OP
Guest
J

Joined: Jun 2016
Posts: 2
france
Thank's a a lot Wingt !
I try quickly and it seems to work.
JC


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1