新人Python模型求问

新人求问Python问题

这里面代码有错误,请问怎么解决?
def init(context):
g.index=‘600011.SH’

Variables=(var0(0),var1(0),kline(0),dline(0));
Variables=(avgPriceBuy(0),avgVol(0),avgPriceExit(0));

value1=Stochastic(High,Low,close,14,3,3,1,var0,var1,kline,dline);

avgPriceBuy=Average(Close,10);
avgVol=Average(Volume,10);
avgPriceExit=Average(Close,20);

if(kline>dline and kline[1]<=dline[1] and Volume>avgVol and Close>avgPriceBuy):

order_target_percent(g.index,1)  
    
log.info("全仓买入{0}".format(g.index));

if(close<AvgPriceExit):

order_target_percent(g.index,0)
 
log.info("全仓卖出{0}".format(g.index))欢迎使用Markdown编辑器

上一篇:使用主键的多表的MYSQL总和


下一篇:mysql – 查找sql​​中两个组合列的平均值