求老師幫忙轉碼成文華8.2 [文華財經]
- 咨詢內容:
input:ss(1,1,100,10);
手數:=ss;
n:=barslast(date<>ref(date,1));
昨高:=callstock(stklabel,vthigh,6,-1);//昨高
昨低:=callstock(stklabel,vtlow,6,-1);//昨低
昨收:=callstock(stklabel,vtclose,6,-1);//昨收
a:=hhv(h,n+1);
b:=llv(l,n+1);
if N>=1 then begin
今高:=a;//今高
今低:=b;//今低
end
觀察賣出價:昨高+0.35*(昨收-昨低);//ssetup
反轉賣出價:(1.07/2)*(昨高+昨低)-0.07*昨低;//senter
反轉買入價:(1.07/2)*(昨高+昨低)-0.07*昨高;//benter觀察買入價:昨低-0.35*(昨高-昨收);//bsetup
突破買入價:(觀察賣出價+0.25*(觀察賣出價-觀察買入價));//bbreeak
突破賣出價:觀察買入價-0.25*(觀察賣出價-觀察買入價);//sbreak//條件
空倉做多條件:=c>突破買入價 and holding=0;
空倉做空條件:=c<突破賣出價 and holding=0;
多單反轉條件:=holding>0 and 今高>觀察賣出價 and c<反轉賣出價;
空單反轉條件:=holding<0 and 今低<觀察買入價 and c>反轉買入價;
//交易系統
if time>=092000 and time<151000 then begin
空倉開多:buy(空倉做多條件,手數,market);
空倉開空:buyshort(空倉做空條件,手數,market);
//多單反轉:
if 多單反轉條件 then begin
平多:sell(1,手數,market);
翻空:buyshort(1,手數,market);
end
//空單反轉:
if 空單反轉條件 then begin
平空:sellshort(1,手數,market);
翻多:buy(1,手數,market);
end
end//日內平倉
if time>=151000 then begin
收盤平多:sell(1,手數,market);
收盤平空:sellshort(1,手數,market);
end - 文華技術人員:
請查看下面的鏈接。
http://help.shwebstock.com.cn/dispbbs.asp?boardid=14&id=372614&page=&star=2
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容