Here is my script:
def ma process(data table){
cols = open'high'low'close' volume'amount'vwap
base_table = select trade date, symbol from data_table
for(col in cols){
print(col)
data = select trade_date, symbol, sma(col,5) as aaa from data_table
base table = lj(base,table,data,trade date'symbol)
}
}
stock_db = database('dfs://stock db')
data_table = stock_db.loadTable('stock daily_hfq')
ma_process(data table)
An error message was reported: X must be a numeric vector
. Can anyone help me identify the cause of this issue and modify my script?