Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,103 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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