加倉與分批出場 [MC]
- 咨詢內容:
加倉
(一)相同條件下的加倉:
1.進場語句:例如- if c>o then
- buy next bar at market;
加倉效果
(二)不同條件加倉
1.進場語句:例如- if condition1 then
- buy(“entry”) next bar at market;
- if condition2 then
- buy(“jiacang1”) next bar at market;
- if condition3 then
- buy(“jiacang2”) next bar at market;
- condition1 =c>o and marketposition=0
- condition2 =c>o and c[1]>o[1]
- condition3 =c>o and c[1]>o[1] and c[2]>o[2]
加倉效果
分批出場
(一)同一筆入場的多手持倉的相同條件的分筆出場
1. 分批出場開關:SameExitFromOneEntryOnce (詳細解釋參考幫助文檔),例:
進場
- if c>o then
- buy 3 shares next bar at market;
- [SameExitFromOneEntryOnce = false];
- if c<o then
- sell 1 Contracts Next Bar At market;
(二)同一筆入場的多手持倉的不同條件的分筆出場- if condition1 then
- sell 1 Contracts total Next Bar At market;
- if condition2 then
- sell 1 Contracts total Next Bar At market;
- if condition3 then
- sell 1 Contracts total Next Bar At market;
平倉效果
(三)不同進場或不同條件不同入場名稱的分批出場(按進場名稱出場),
- if c>o and marketposition=0 then
- buy ("entry") next bar at market;
- if c>o and c[1]>o[1] then
- buy ("jiacang1") next bar at market;
- if c>o and c[1]>o[1] and c[2]>o[2] then
- buy ("jiacang2") next bar at market;
- if c[1]<o[1] then begin
- sell from entry("entry") next bar at market;
- sell from entry("jiacang1") next bar at market;
- sell from entry("jiacang2") next bar at market;
- end;
本帖子中包含更多資源
您需要 登錄 才可以下載或查看,沒有帳號?立即注冊
加倉 - if c>o then
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容