請客位大大 幫忙 謝謝
問題很簡單,答案很複雜
不同的進場方式,及不同的停損方式,不同的損失認定,都有不同的寫法
所以~
無解~
他問的是針對setstoploss停損
應該可以用exitname去做條件判斷
然後再紀錄K棒
兩根後再重新進場
我程式不太會寫
看有沒有人可以寫看看
對厚,他是指定特定的停損,我沒看清楚標題
用下面的指令把進場包起來就可以,但我忘了SET停損的顯示字樣是什麼了,把它填進 " " 中就可以了
if exitname(1) <> " " or barssinceexit > 2 then
請問要如何包起來呢??
進場指令為 if K cross over D then buy("buy1") 1 share next bar at market;
if exitname(1) <> "Stop Loss " or barssinceexit > 2 and K cross over D then buy("buy1") 1 share next bar at market;
這樣跑出來變很多進場buy1 ????
請大大幫忙看一下
OR 跟 AND 不要混用
if exitname(1) <> "Stop Loss " or barssinceexit > 2 then begin
if K cross over D then buy("buy1") 1 share next bar at market;
end;