当盈利大于1万时在K线图上方MA15标题下显示浮动盈亏金额
能贴图说明下吗?
ma5:ma(c,5);
if ref(c,1)>ma5 and ref(c,2)>ma5 then BEGIN
buy(HOLDING=0,1,MARKET);
end
if OPENPROFIT>100 and holding>0 then //浮动盈亏大于100
浮动盈亏:OPENPROFIT;
if ref(c,1)<ma5 and ref(c,2)<ma5 then BEGIN
sell(1,1,MARKET);
end
为什么以下策略不显示浮动盈亏呢?
ma5:ma(c,5);
if ref(c,1)<ma5 and ref(c,2)<ma5
then BEGIN
buyshort(HOLDING=0,1,MARKET);
end
if OPENPROFIT>1000 and holding>0 then
//浮动盈亏大于1000
浮动盈亏:OPENPROFIT;
if ref(c,1)>ma5 and ref(c,2)>ma5
then BEGIN
sellshort(1,1,MARKET);
end