[求助]請幫忙寫一個例子 [金字塔]
-
咨詢內容:
滿足條件A時,為買入參考信號,出現信號時的價位為參考信號價位1。當價格自參考信號價位1回落X價位時買入,止損幅度為實際買入價和參考信號價1的價差。滿足條件B時,為賣出參考信號,出現信號時的價位為參考信號價位2.當價格自參考信號價位2上升X價位時賣出,止損幅度為實際賣出價和參考信號價2的價差。這實際上是一個回調買入的策略思路。搜了一下論壇沒有找到類似的參考,所以想麻煩你們給寫一個作為參考。謝謝。
?
-
金字塔客服:
圖表交易嗎?圖表取不到實際買入價,只能取圖上虛擬買入價位enterprice
?
?來源:程序化久久網( www.weiqiv.net.cn )
-
用戶回復:
enterprice即可。僅作參考。
?
-
網友回復:
VARIABLE:n=0,m=0;
if a then n:=c;
if n-l>=x and holding=0 then buy(1,1,marketr);
if enterprice-c>=abs(enterprice-n) and holding>0 then sell(1,1,marketr);
if b then m:=c;
if h-m>=x and holding=0 then buyshort(1,1,marketr);
if c-enterprice>=abs(enterprice-m) and holding<0 then sellshort(1,1,marketr)
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容