Gamestudio Links
Zorro Links
Newest Posts
NOMAX undeclared identifier.
by qin. 01/09/26 00:20
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 01/07/26 15:14
Zorro locks DLL
by jcl. 01/07/26 13:33
zorro with ccxt?
by qin. 01/07/26 07:50
The new evaluation system
by jcl. 01/05/26 08:50
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Quad, 1 invisible), 3,552 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Namitha_NN, Syndrela, agasior, mosfet, MonsterX
19188 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
error #476586
03/11/19 13:59
03/11/19 13:59
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
i have a problem with my scrip. i wrote script below. this "else if(asset("EUR/JPY"))" error appeared. How to fix error?. Every assets must be own EMA and LinearRegSlope time period. For this script USDJPY has 330,350 and ERUJPY has 480,270. If there will be 10 assets with different EMA and LinearRegSlope time period, how to write simple code?





function arjiljaa1(){
...
if(asset("USD/JPY"))
vars HuvisagchEma = series(EMA(Une,330));
vars HuvisagchRegression = series(LinearRegSlope(HuvisagchEma,350));
else if(asset("EUR/JPY"))
vars HuvisagchEma = series(EMA(Une,480));
vars HuvisagchRegression = series(LinearRegSlope(HuvisagchEma,270));
...

}

function run()
{
...
StartDate = 20100101;
EndDate = 20161231;

while(asset(loop("USD/JPY","EUR/JPY")))
while(algo(loop("code1")))
{
if(Algo == "code1")
ariljaa1();

}

}

Re: error [Re: tuuPaul] #476646
03/18/19 21:10
03/18/19 21:10
Joined: Aug 2018
Posts: 101
O
OptimusPrime Offline
Member
OptimusPrime  Offline
Member
O

Joined: Aug 2018
Posts: 101
You are missing brackets. { }

if (Condition 1)
{


}

else

{



}


Thanks so much,

OptimusPrime


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1