如何根據各種狀況來加倉進場或分批出場[MC公式]
-
今天策略天地來教教大家如何根據各種狀況來加倉進場或分批出場,
1.相同條件下的加倉:if condition1 thenbuy next bar at market;加倉設置
加倉效果(這個的condition1=c>o):
2.不同條件加倉if condition1 thenbuy(“entry”) next bar at market;if condition2 thenbuy(“jiacang1”) next bar at market;if condition3 thenbuy(“jiacang2”) next bar at market; 這個的condition1 =c>o and marketposition=0condition2 =c>o and c[1]>o[1]condition3 = c>o and c[1]>o[1] and c[2]>o[2]加倉設置:
加倉效果
同一筆入場的多手持倉的相同條件的分筆出場分批出場開關:SameExitFromOneEntryOnceif c>o thenbuy 3 shares next bar at market;[SameExitFromOneEntryOnce = false];if c<o thensell 1 Contracts Next Bar At market;
分批出場效果
同一筆入場的多手持倉的不同條件的分筆出場if condition1 thensell 1 Contracts total Next Bar At market;if condition2 thensell 1 Contracts total Next Bar At market;if condition3 thensell 1 Contracts total Next Bar At market;通過total 每次固定只平1手
平倉效果
不同進場或不同條件不同入場名稱的分批出場(按進場名稱出場),if c>o and marketposition=0 thenbuy ("entry") next bar at market;if c>o and c[1]>o[1] thenbuy ("jiacang1") next bar at market;if c>o and c[1]>o[1] and c[2]>o[2] thenbuy ("jiacang2") next bar at market;if c[1]<o[1] then beginsell from entry("entry") next bar at market;sell from entry("jiacang1") next bar at market;sell from entry("jiacang2") next bar at market;end;
出場效果 :
market, 加倉, 開關, 如何
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容