aven0819 發表於 15-7-11 17:57

請問大大語法,小弟一直試都有錯,請大大幫忙,感恩


請問大大,小弟最近試一個語法一直有錯,想請問一下

手上有多單   當第5根k棒小於第1根k棒    多單反手賣出變空單    如果沒有小於就不動作

小弟寫的語法如下

if CurrentContracts > 0 and c > closethen sell next barend if

但程式一直有錯,想請教大大是否那裡寫錯了,感恩

easytrader788 發表於 15-7-12 19:26

如果是進場後第五根K棒

if MarketPosition > 0 and BrasSinceEntry = 5 and Close < Close then sellshort next bat at Market ;

eychang 發表於 15-7-13 08:09

if MarketPosition > 0 and BrasSinceEntry = 5 and Close < Low then
sellshort next bat at Market ;
end;

easytrader788 發表於 15-7-13 11:59

easytrader788 發表於 15-7-12 19:26 static/image/common/back.gif
如果是進場後第五根K棒

if MarketPosition > 0 and BrasSinceEntry = 5 and Close < Close then sellsh ...


如果是進場後第五根K棒

if MarketPosition > 0 and BrasSinceEntry = 5 and Close < Close then sellshort next bat at Market ;


更正 if MarketPosition > 0 and BrasSinceEntry = 5 and Close < Close then sellshort next bat at Market ;

aven0819 發表於 15-7-13 22:31

感恩大大,終於成功了,yaaa
頁: [1]
查看完整版本: 請問大大語法,小弟一直試都有錯,請大大幫忙,感恩