當2處以后出現價格大于等于a,我們就平倉,怎么編寫 [金字塔]
- 咨詢內容:
1處有一手空單,當運行到2處(C上穿白線(ma(c,30))的時候,我們停下來計算一個值a,a=ma(c,30)+2*atr (ma(c,30)和ATR都是2處這根K線的。。。當2處以后出現價格大于等于a,我們就平倉。怎么編寫···
- 金字塔客服: 工作人員在處理,稍后回復
- 用戶回復: 謝謝
- 網友回復:
{1處有一手空單,當運行到2處(C上穿白線(ma(c,30))的時候,
我們停下來計算一個值a,a=ma(c,30)+2*atr
(ma(c,30)和ATR都是2處這根K線的。。。
當2處以后出現價格大于等于a,我們就平倉。怎么編寫···
5分鐘周期股指}
variable:aa=0,bb=0;
ma30:=ma(c,30);
atr:=stkindi('','atr.atr',0,2);
cond:=開空條件;
if cond and holding=0 then begin
buyshort(1,1,market);
aa:=0;
end
if aa=0 and holding<0 and cross(c,ma30) then begin
aa:=1;
bb:=ma30+2*atr;
endif aa=1 and c>bb then begin
僅供參考
sellshort(1,0,market);
aa:=0;
bb:=0;
end - 網友回復:
ma30:=ma(c,30);
cond1:=holding<0;
cond2:=cross(c,ma30);
variable:a:=0;if cond2 and cond1 then
begin
a:=ma30+2*STKINDI('' ,'ATR.ATR' ,0 ,1 ,0 );hh:=c;
end
if hh<c then sellshort(1,0,market);僅供參考
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 262069696 進行 有償 編寫!(不貴!點擊查看價格!)