|
組合上下兩策略的交易訊號
ps:箭頭按照出現時間的前後順序兩圖合併
condition1 = 藍箭頭[1] 且 藍箭頭[0] then buy 1 share next bar at market
condition2 = 藍箭頭[1] 且 紅箭頭[0] then sell 1 share next bar at market
condition3 = 紅箭頭[1] 且 紅箭頭[0] then sellshort 1 share next bar at market
condition4 = 紅箭頭[1] 且 藍箭頭[0] then buytocover 1 share next bar at market
暴力法,
就把兩個策略改個變數名稱後,
直接放在一起,
再判斷箭頭的出現順序 |
|