請老師把下面兩個公式給文華能用的。謝謝 [文華財經]
- 咨詢內容:
第一個公式:
M1:12 M2:26 M3:3
生死線:0,COLOR00AAAA;
VAR1:="MACD.DEA"(M1,M2,M3)*100;
VAR2:=REF(VAR1,1); {昨日的VAR1}
VAR3:="MACD.DEA"(M1,M2,M3)*100; {同VAR1}
VAR4:=SMA(C,5,1);
VAR5:=REF(VAR4,1); {昨日的VAR1}
{人造VAR1上漲K線,分兩種1.放量漲紅色標記(可追),
2放量跌藍色標記(頂部和頸線位是殺跌必須空倉,底部是趕底(趕完底可進)}
STICKLINE(VAR1>VAR2 AND VAR4>=VAR5,VAR1,VAR2,3,1),COLOR0000FF;
{STICKLINE(VAR1>VAR2 AND VAR4>=VAR5,VAR1,VAR2,1,0),COLOR0000FF; }
STICKLINE(VAR1>VAR2 AND VAR4<=VAR5,VAR1,VAR2,3,1),COLORFF0000;
{STICKLINE(VAR1>VAR2 AND VAR4<=VAR5,VAR1,VAR2,1,0),COLORFF0000; }
{人造VAR1下跌K線,分兩種1.縮量跌綠色標記(空倉),2縮量漲淺藍標記(謹慎)}
STICKLINE(VAR1<VAR2 AND VAR4<=VAR5,VAR1,VAR2,3,1),COLOR00FF00;
{STICKLINE(VAR1<VAR2 AND VAR4<=VAR5,VAR1,VAR2,1,0),COLOR00FF00; }
STICKLINE(VAR1<VAR2 AND VAR4>=VAR5,VAR1,VAR2,3,1),COLORFFFF00;
{STICKLINE(VAR1<VAR2 AND VAR4>=VAR5,VAR1,VAR2,1,0),COLORFFFF00; }
上軌:HHV(VAR1,N1),COLOR333366;
IF(上軌<=REF(上軌,1),上軌,DRAWNULL),COLORFFFFFF,LINETHICK1;
下軌:LLV(VAR1,N2),COLOR336633;
IF(下軌>=REF(下軌,1),下軌,DRAWNULL),COLORMAGENTA,LINETHICK1;
=========================第二個公式:
MA1:MA(CLOSE,M1);
DRAWKLINE(H,O,L,C);
STICKLINE(MA1>=REF(MA1,1),H,L,0,0),COLOR0000FF;
STICKLINE(MA1>=REF(MA1,1) AND (C>=O),O,C,3,1),COLOR0000FF;
STICKLINE(MA1>=REF(MA1,1)AND (C<=O),O,C,3,0),COLOR0000FF;
STICKLINE(MA1<REF(MA1,1),H,L,0,0),COLOR00FF00;
STICKLINE(MA1<REF(MA1,1) AND (C>=O),O,C,3,1),COLOR00FF00;
STICKLINE(MA1<REF(MA1,1) AND (C<=O),O,C,3,0),COLOR00FF00; - 文華技術人員:
1.
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);//短周期與長周期的收盤價的指數平滑移動平均值做差。
DEA := EMA(DIFF,3);//DIFF的M個周期指數平滑移動平均
生死線:0,COLOR00AAAA;
VAR1:=DEA*100;
VAR2:=REF(VAR1,1);
VAR3:=DEA*100;
VAR4:=SMA(C,5,1);
VAR5:=REF(VAR4,1);STICKLINE1(VAR1>VAR2 AND VAR4>=VAR5,VAR1,VAR2,3,1),COLOR0000FF;
STICKLINE1(VAR1>VAR2 AND VAR4>=VAR5,VAR1,VAR2,1,0),COLOR0000FF;
STICKLINE1(VAR1>VAR2 AND VAR4<=VAR5,VAR1,VAR2,3,1),COLORFF0000;
STICKLINE1(VAR1>VAR2 AND VAR4<=VAR5,VAR1,VAR2,1,0),COLORFF0000;STICKLINE1(VAR1<VAR2 AND VAR4<=VAR5,VAR1,VAR2,3,1),COLOR00FF00;
STICKLINE1(VAR1<VAR2 AND VAR4<=VAR5,VAR1,VAR2,1,0),COLOR00FF00;
STICKLINE1(VAR1<VAR2 AND VAR4>=VAR5,VAR1,VAR2,3,1),COLORFFFF00;
STICKLINE1(VAR1<VAR2 AND VAR4>=VAR5,VAR1,VAR2,1,0),COLORFFFF00;
上軌:HHV(VAR1,N1),COLOR333366;
IF(上軌<=REF(上軌,1),上軌,NODRAW),COLORFFFFFF,LINETHICK1;
下軌:LLV(VAR1,N2),COLOR336633;
IF(下軌>=REF(下軌,1),下軌,NODRAW),COLORMAGENTA,LINETHICK1;2.
MA1:MA(CLOSE,M1);
DRAWKLINE1(H,O,L,C);
STICKLINE1(MA1>=REF(MA1,1),H,L,0,0),COLOR0000FF;
STICKLINE1(MA1>=REF(MA1,1) && (C>=O),O,C,3,1),COLOR0000FF;
STICKLINE1(MA1>=REF(MA1,1)&& (C<=O),O,C,3,0),COLOR0000FF;
STICKLINE1(MA1<REF(MA1,1),H,L,0,0),COLOR00FF00;
STICKLINE1(MA1<REF(MA1,1) && (C>=O),O,C,3,1),COLOR00FF00;
STICKLINE1(MA1<REF(MA1,1)&&(C<=O),O,C,3,0),COLOR00FF00;僅供參考; 上述2模型中N1 N2 M1 是參數根據需求自行設定具體數字就可以了;
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容