分時圖交易策略 [金字塔]
-
咨詢內容:
分時均線上開多
每盈利5個點平倉3分之1
每盈利10個點平倉3分之1
每盈利20個點平倉3分之1
如果分時均線向下擊穿全部平倉,
分時均線下開空
每盈利5個點平倉3分之1
每盈利10個點平倉3分之1
每盈利20個點平倉3分之1
如果分時均線出現向上擊穿,全部平倉
每天收盤全部平倉
?
-
金字塔客服:
你說的平掉三分之一,是指剩余的三分之一?還是什么?
?
?來源:程序化久久網( www.kzuj.com.cn )
-
用戶回復:
分三次平倉比如總建倉9手? 先平3手 再3手? 3手的平倉
?
-
網友回復:
?1.先處理下分時均線http://www.weistock.com/bbs/dispbbs.asp?boardid=4&Id=6285
n1:=todaybar;
dm:=4-INTPART(LOG(C));
結算價:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm),colorred;
不過這個無法完全等效系統自帶的分時均線,但大體上是貼近的。
2.上下穿用cross函數
3.分段平倉。多頭為例。
if c-enterprice>=5 and holding>0 then begin
sell(holding>0,holding/3,market);
end
if c-enterprice>=10 and holding<0 then begin
sell(holding>0,holding/2,market);
end
if c-enterprice>=20 and holding<0 then begin
sell(holding>0,holding,market);
end具體編寫細節你可以先自行嘗試下。
?
-
網友回復:
//分時線數據?
n1:=todaybar;
dm:=4-INTPART(LOG(C));
結算價:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm),colorred;
KD:=CROSS( C,結算價 );? ? ? ? ? //開多條件 if c-enterprice>=5 and holding>0 then begin sell(holding>0,holding/3,market); end
if c-enterprice>=10 and holding<0 then begin sell(holding>0,holding/2,market); end
if c-enterprice>=20 and holding<0 then begin sell(holding>0,holding,market); end;? ? ? ? ? //平多條件 KK:=CROSS( 結算價,C );? ? ? ? ? //開空條件 if c-enterprice>=-5 and holding>0 then begin sell(holding>0,holding/3,market); end
if c-enterprice=-10 and holding<0 then begin sell(holding>0,holding/2,market); end
if c-enterprice>=-20 and holding<0 then begin sell(holding>0,holding,market); end;? ? ? ? ? //平空條件
PK:=CROSS( 結算價,C ); PD:=CROSS( C,結算價 );?
平空:SELLSHORT(PK,9,THISCLOSE);? ? ? ? ? ? ? ? ? //平空信號 開多:BUY(KD AND HOLDING=0,9,THISCLOSE);? ? ? ? ? //開多信號 平多:SELL(PD,9,THISCLOSE);? ? ? ? ? ? ? ? ? ? ? ?//平多信號 開空:BUYSHORT(KK AND HOLDING=0,9,THISCLOSE);? ? ?//開空信號
幫我修改下,平倉都是一次性平倉的,改成分批平倉的
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 或微信號:cxh99cxh99 進行 有償收費 編寫!(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,謝謝您!)
相關文章
-
沒有相關內容