请老师把下面两个公式给文华能用的。谢谢 [文华财经]
- 咨询内容:
第一个公式:
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 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容