Hi,

 

I tried the following script:

 

set echo off

set messages off

 

# sample function call

nulldata 1800

setobs 5 2008-01-01  # a daily dataset should be already in place

 

loop foreach a RHT TKA

    string ausgabe = "Aktie " ~ "$a"

    print ausgabe

    series "$a"

    $a = yahoo_price($a)

endloop

 

As you might guess, the idea is to download a couple of time series from yahoo.

Each series should receive the name of the stock.

However, apart from the fact that it is not working (I am happy to get help here, too),

I get the following error message:

 

> set messages off

> > # sample function call

> nulldata 1800

Sorry, this command is not available in loop mode

 

Error executing script: halting

> nulldata 1800

 

But I am not in loop mode! And the command “nulldate” is not in the loop!

To me, it seems that the loop is not finished when an error is raised.

 

When you want to replicate the error, you might need to comment out $a = yahoo_price($a), run it and then

remove the # and run again. Then again, comment out, run, remove the comment, run. The respective

error message appears only every second run.

 

Thanks for your help!

 

Kind regards,

 

Thorsten