求老師把指標信號改成自動化反手交易 [金字塔]
- 咨詢內容:
指標源碼如下:
NN:=DATE<>REF(DATE,1);
BARNUMBER1:=BARSLAST(NN)+1;
BARNUMBER2:=50;
MAH1:=WMA(H,BARNUMBER1),LINETHICK2,COLORGREEN;
MAL1:=WMA(L,BARNUMBER1),LINETHICK2,COLORRED;
MAH2:WMA(H,BARNUMBER2),LINETHICK2,COLORMAGENTA;
MAL2:WMA(L,BARNUMBER2),LINETHICK2,COLORMAGENTA;
IF(MAH2>=REF(MAH2,1),MAH2,DRAWNULL),COLORMAGENTA,LINETHICK2;
IF(MAL2>=REF(MAL2,1),MAL2,DRAWNULL),COLORMAGENTA,LINETHICK2;
IF(MAH2<REF(MAH2,1),MAH2,DRAWNULL),COLORCYAN,LINETHICK2;
IF(MAL2<REF(MAL2,1),MAL2,DRAWNULL),COLORCYAN,LINETHICK2;DRAWTEXT(MAH2>=REF(MAH2,1) AND MAL2>=REF(MAL2,1) AND (REF(MAH2,1)<=REF(MAH2,2) OR REF(MAL2,1)<=REF(MAL2,2)),L*0.999,'短多B'),COLORRED;
DRAWTEXT(MAH2<=REF(MAH2,1) AND MAL2<=REF(MAL2,1) AND (REF(MAH2,1)>=REF(MAH2,2) OR REF(MAL2,1)>=REF(MAL2,2)),H*1.001,'短空S'),COLORGREEN;
- 金字塔客服:
NN:=DATE<>REF(DATE,1);
BARNUMBER1:=BARSLAST(NN)+1;
BARNUMBER2:=50;
MAH1:=WMA(H,BARNUMBER1),LINETHICK2,COLORGREEN;
MAL1:=WMA(L,BARNUMBER1),LINETHICK2,COLORRED;
MAH2:WMA(H,BARNUMBER2),LINETHICK2,COLORMAGENTA;
MAL2:WMA(L,BARNUMBER2),LINETHICK2,COLORMAGENTA;
IF(MAH2>=REF(MAH2,1),MAH2,DRAWNULL),COLORMAGENTA,LINETHICK2;
IF(MAL2>=REF(MAL2,1),MAL2,DRAWNULL),COLORMAGENTA,LINETHICK2;
IF(MAH2<REF(MAH2,1),MAH2,DRAWNULL),COLORCYAN,LINETHICK2;
IF(MAL2<REF(MAL2,1),MAL2,DRAWNULL),COLORCYAN,LINETHICK2;DRAWTEXT(MAH2>=REF(MAH2,1) AND MAL2>=REF(MAL2,1) AND (REF(MAH2,1)<=REF(MAH2,2) OR REF(MAL2,1)<=REF(MAL2,2)),L*0.999,'短多B'),COLORRED;
DRAWTEXT(MAH2<=REF(MAH2,1) AND MAL2<=REF(MAL2,1) AND (REF(MAH2,1)>=REF(MAH2,2) OR REF(MAL2,1)>=REF(MAL2,2)),H*1.001,'短空S'),COLORGREEN;
if MAH2>=REF(MAH2,1) AND MAL2>=REF(MAL2,1) AND (REF(MAH2,1)<=REF(MAH2,2) OR REF(MAL2,1)<=REF(MAL2,2)) then begin
sellshort(1,0,market);
buy(holding=0,1,market);
endif MAH2<=REF(MAH2,1) AND MAL2<=REF(MAL2,1) AND (REF(MAH2,1)>=REF(MAH2,2) OR REF(MAL2,1)>=REF(MAL2,2)) then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容