Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by clonman. 11/13/25 14:04
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Training with the R bridge does not work
by frutza. 11/05/25 00:46
Zorro 2.70
by opm. 10/24/25 03:44
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Grant, AndrewAMD, ozgur, Quad, TipmyPip), 29,980 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sheliepaley, Blueguy, blobplayintennis, someone2, NotEBspark
19177 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
price series, RSI -- syntax error #488340
08/17/24 13:31
08/17/24 13:31
Joined: Jan 2021
Posts: 19
J
jari Offline OP
Newbie
jari  Offline OP
Newbie
J

Joined: Jan 2021
Posts: 19
Hi, may I know why the following code generates error? Thank you

Code
	vars underlyingPrices = series(price(0));
	vars underlyingRsi = RSI(underlyingPrices, 14);

	if(!NumOpenShort && !is(LOOKBACK) && (underlyingRsi(0) < 25) && ((price(0) - price(5))/price(5) <= -0.10)) { }


The error:
Error in 'line 26:
@underlyingRsi_02458(): syntax error

Thank you

Re: price series, RSI -- syntax error [Re: jari] #488341
08/17/24 13:41
08/17/24 13:41
Joined: Jan 2021
Posts: 19
J
jari Offline OP
Newbie
jari  Offline OP
Newbie
J

Joined: Jan 2021
Posts: 19
Got the answer: need to insert series( before RSI(

Code
	vars underlyingPrices = series(price());
	vars underlyingRsi = series(RSI(underlyingPrices, 14));

	if(!NumOpenShort && !is(LOOKBACK) && (underlyingRsi[0] < 25) && ((price(0) - price(5))/price(5) <= -0.10)) { 


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1