Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (EvanTJ, AndrewAMD, TipmyPip), 12,414 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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