thnaks for your help. I've looked up on the data download by alpha vantage. So it return the daily data and the last record. I've tried to use priceSet, but in live mode it returns :
Trade: model2 2017-06-30
Lookback period (145 bars)
Error 030: asset ^GSPC missing in INITRUN
Error 011: Function KAMA called with invalid parameters (no price)
Error 011: Function EMA called with invalid parameters (no price)

It seems the script won't charge the database ^GSPC.t6 in live mode.