dunhilltc 發表於 12-4-4 09:29

[發問]請問MC上面可以寫出一天只做兩次的限制嗎

小弟目標是當沖
但是盤整盤的時候很容易被巴
有辦法寫出停損兩次之後今天就停止交易嗎

drfutures 發表於 12-4-4 10:14

HTS可以,MC應該也可以的!

曾永政 發表於 12-4-4 10:56

MultiCharts 有內建函數 DailyLosers(Date) 可以計算當天已經虧損幾次了。

if BuyCondition and DailyLosers(Date)<3 then .....
這樣就可以讓當天虧損次數發生3次後就條件不成立,於是當天不會再有交易。

dunhilltc 發表於 12-4-4 11:36

曾永政 發表於 12-4-4 10:56 static/image/common/back.gif
MultiCharts 有內建函數 DailyLosers(Date) 可以計算當天已經虧損幾次了。

if BuyCondition and DailyLose ...

請問if BuyCondition and DailyLosers(Date)<3 then .....
...是可以直接打if BuyCondition and DailyLosers(Date)<3 then stop這樣子嗎

曾永政 發表於 12-4-4 11:46

dunhilltc 發表於 12-4-4 11:36 static/image/common/back.gif
請問if BuyCondition and DailyLosers(Date)

當然不是 =_=

那是指把你的買進動作的條件,多加一個 DailyLosers 的判斷進去...

買一本"程式交易語法大全"吧,凱衛也有在開課的

GilbertPan 發表於 12-4-18 11:32

可以用一個變數去計算當天停損次數,超過就不交易~
頁: [1]
查看完整版本: [發問]請問MC上面可以寫出一天只做兩次的限制嗎