IF HOLDING=-1 AND HIGH>=SELLSHORTBand
THEN BEGIN
IF Open>SELLSHORTBand THEN myEnterPrice=Open;
ELSE myEnterPrice=SELLSHORTBand;
SELLSHORT(1,Lots,myEnterPrice);
END
IF holding=1 AND Low<=SellBand
THEN BEGIN
IF Open<SellBand THEN myEnterPrice=Open;
Else myEnterPrice=SellBand;
Sell(1,Lots,myEnterPrice);
END 这段代码,有没有用else表示清楚myenterprice 在不同情况下的取值? 另外,是不是表达了按照myenterprice这个指定价格进行平仓的意思.我是按照TB的程序改出来的,最后测试出来的成交记录和TB差别很大
交易函数指定价格的话要用限价指令: sell(1,1,limit,open);比如这样
myEnterPrice的分类赋值没什么问题。