止損的的價位作為下一次交易信號的起點 ? [金字塔]
-
咨詢內容:
我想把oo定義成為????oo = oo-(n+1)*grid*mindiff或者oo = oo+(n+1)*grid*mindiff; 就是止損后的價位重新作為一個起點重新畫區間,請問大神怎么定義oo 呢????
input:grid(70,1,600,1);
variable:level=0;
n: = 10;
保證金比率: = 0.1;
SS: = ASSET/n/CLOSE/MULTIPLIER/保證金比率;
VARIABLE : oo = 3000;
if holding=0 and c >oo then begin??????? //初始化開多dnprice:=oo-grid*mindiff;if low<=dnprice then begin
buy(1,SS,limitr,dnprice);
level:=-1;end
end
if holding=0 and c<oo? then begin?????? //初始化開空
upprice:=oo+grid*mindiff;if high>=upprice then begin
buyshort(1,SS,limitr,upprice);
level:=1;end
end
if holding>0 and level <n? then begin???? //加多
upprice:=oo+(level+1)*grid*mindiff;
dnprice:=oo+(level-1)*grid*mindiff;if high>=upprice then begin
sell(1,SS,limitr,upprice);
level:=level+1;
end
if low<=dnprice then begin
buy(1,SS,limitr,dnprice);
level:=level-1;
end
endif holding<0 and level <n? then begin???????? //加空
upprice:=oo+(level+1)*grid*mindiff;
dnprice:=oo+(level-1)*grid*mindiff;if low<=dnprice then begin
sellshort(1,SS,limitr,dnprice);
level:=level-1;endif high>=upprice then begin
buyshort(1,SS,limitr,upprice);
level:=level+1;
end
endif holding >0 and l <oo then begin????? //多 切換
sell(1,holding,limitr,oo);
end
if holding <0 and h> oo then begin??? //空? 切換
sellshort(1,holding,limitr,oo);
end
if holding >0 and h >oo+(n+1)*grid*mindiff then begin??? //多全平
? oo = oo+(n+1)*grid*mindiff;
?sellshort(1,holding,limitr,close);
?end
?if holding <0 and l >oo-(n+1)*grid*mindiff then begin?? //空全平
?
?oo = oo-(n+1)*grid*mindiff;
?sell(1,holding,limitr,close);
?end
??
-
金字塔客服:
麻煩詳細說明下你的需求。上面的表述不是很明白
?
?來源:程序化久久網( www.kzuj.com.cn )
-
用戶回復:
原理是上漲做空? 下跌做多,采用網格交易策略,oo是多空分界線? 。如果連續做空10次后,繼續上漲,則立刻全部平倉。 該平倉價位重新作為下一次做多做空的分界線。求指導這句話怎么寫
?
-
網友回復:
網格策略,您自己論壇可以搜下了解下相關內容
對于算法細節層面,工作人員這邊也好提供非常全面的支持,如果您對某些函數功能上的疑問可以在這邊資訊
?
- 網友回復: 對于網格交易我很明確,我只是想在網格交易基礎上改變一下,限定最多連續加倉n次,超過n次后立刻全部平倉, 在n次全部平倉后繼續網格交易 我在論壇找了很多源碼,這個就是其中一個源碼改進的,就是全部平倉后網格起點重新怎么定義的問題,您可以仔細看一下嗎
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容