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();

}

}