請教: 為何沒任何信號出現? [金字塔]
- 咨詢內容:
請教: 為何沒任何信號出現?
ZZ1:=cross(c,ma(c,5));
DD1:=cross(ma(c,5),c);
開多條件:=ZZ1;//開多條件
平多條件:=DD1;//平多條件
開空條件:=DD1;//開空條件
平空條件:=ZZ1;//平空條件
///////////////////////////////////////////////////////////////////////////////////////////////
TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR1,14);
多開RATR:=valuewhen(開多條件 and holding=2,ATR);
空開RATR:=valuewhen(開空條件 and holding=2,ATR);
{
1.開倉2手后自動設止損 X*RATR (X缺省為 1)
2.開倉2手后盈利達到了 Y*RATR, 將2手止損改為保本(成本+2跳)
3.保本后,盈利未達到 Z1*RATR前,忽略所有平倉信號,只有在盈利超過 Z1*RATR的平倉信號出現后才平倉1手。
4.保本后,盈利未達到 Z2*RATR前,忽略所有平倉信號,只有在盈利超過 Z2*RATR的平倉信號出現后才平倉1手。
}
if openprofit<=-2*x*多開RATR then SELL(1,0,market);
if openprofit>=y*多開RATR then begin
if openprofit>=zyx1*多開RATR and openprofit<zyx2*多開RATR and 平多條件 and holding=2 then sell(holding=2,1,market);
if openprofit>=zyx2*多開RATR and 平多條件 and holding=1 then sell(holding=1,1,market);
end
if openprofit<=-1*x*空開RATR then SELLSHORT(1,0,market);
if openprofit>=y*空開RATR then begin
if openprofit>=zyx1*空開RATR and openprofit<zyx2*空開RATR and 平空條件 and holding=2 then SELLSHORT(holding=2,1,market);
if openprofit>=zyx2*空開RATR and 平空條件 and holding=1 then SELLSHORT(holding=1,1,market);
end
資產:asset,noaxis; - 金字塔客服:
坐等行家解惑..........
- 用戶回復:
X:=;
Y:=;
ZYX1:=;
ZYX2:=;這幾個是多少?
- 網友回復:
X:=1;
Y:=2;
ZYX1:=3;
ZYX2:=4; - 網友回復: 隨便給的數字結果就是我這里一個交易信號都沒有
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容