大智慧macd指标源码(大智慧macd怎么设置)
内容导航:
Q1:求大智慧MACD的源代码
DIFF: EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),colorwhite;
DEA: EMA(DIFF,M),coloryellow;
MACD: 2*(DIFF-DEA), COLORSTICK
Q2:请高手把大智慧彩色MACD公式修改为通达信公式(续前):
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二金:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二金,0,-0.10,6,0),COLORFF00FF;
DRAWICON(二金,DEA*1.04,13);
DRAWTEXT(二金,-0.08,' 二金'),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,0.13,6,0),COLORRED;
DRAWTEXT(底背离,DEA,' 底背离'),COLORRED;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
DRAWTEXT(顶背离,DEA,' 顶背离'),COLORGREEN;
AA1:=DIF<0 AND DEA<0;
AA2:=AA1>REF(AA1,1);
AA3:=BARSLAST(AA2);
AA4:=COUNT(DEA>0 AND DIF>0,AA3)=0;
AA5:=CROSS(DIF,DEA);{金叉}
AA6:=BARSLAST(AA5);
AA7:=REF(AA6,AA6+1)+AA6;
AA8:=(DIF+DEA)/2;
AA9:=(HIGH+LOW)/2;
AA10:=AA5 AND AA7<AA3 AND AA4 AND AA8>REF(AA8,AA7) AND AA9<REF(AA9,AA7) AND MACD>0;
DRAWTEXT(AA10,DIF*0.95,'★'),COLORYELLOW;
Q3:求把大智慧的MACD公式改成通达信的,非常感谢。
{通达信测试通过!}
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),COLORWHITE;
DEA : EMA(DIFF,9),COLORYELLOW;
MACD : 2*(DIFF-DEA),COLORSTICK;
{======================================================}
COND1:=LONGCROSS(DEA,DIFF,3);
COND2:=LONGCROSS(DIFF,DEA,3);
VAR1:=BARSLAST(COND1);
VAR2:=REF(VAR1,VAR1+1)+1;
VAR3:=BARSLAST(COND2);
VAR4:=REF(VAR3,VAR3+1)+1;
VAR5:=REF(VAR3,VAR1)+1;
MACDTOP1:=REF(HHV(DIFF,VAR5),VAR1);
TOP1:=REF(HHV(HIGH,VAR5),VAR1);
VAR6:=REF(VAR3,VAR1+VAR2)+1;
MACDTOP2:=REF(HHV(DIFF,VAR6),VAR1+VAR2);
TOP2:=REF(HHV(HIGH,VAR6),VAR1+VAR2);
顶背离0:=TOP1>TOP2 AND MACDTOP1<MACDTOP2;
顶背离:=顶背离0>REF(顶背离0,1);
VAR7:=REF(VAR1,VAR3)+1;
MACDBASE1:=REF(LLV(DIFF,VAR7),VAR3);
BASE1:=REF(LLV(LOW,VAR7),VAR3);
VAR8:=REF(VAR1,VAR3+VAR4)+1;
MACDBASE2:=REF(LLV(DIFF,VAR8),VAR3+VAR4);
BASE2:=REF(LLV(LOW,VAR8),VAR3+VAR4);
底背离0:=BASE1<BASE2 AND MACDBASE1>MACDBASE2;
底背离:=底背离0>REF(底背离0,1);
VAR9:=BARSLAST(顶背离);
VAR10:=REF(HHVBARS(DIFF,REF(VAR3,VAR9)),VAR9);
DLTOP1:=FILTER(BACKSET(顶背离,VAR10+1),VAR10);
VAR11:=REF(VAR1,VAR9+1)+1;
VAR12:=REF(HHVBARS(DIFF,REF(VAR3,VAR9+VAR11))+1,VAR9+VAR11);
DLTOP2:=FILTER(BACKSET(顶背离,VAR9+VAR11+VAR12),VAR9+VAR11+VAR12);
DRAWLINE(DLTOP2,DIFF,DLTOP1,DIFF,0),COLORRED;
DRAWICON(顶背离,DIFF,2),COLORGREEN{,ALIGN1,VALIGN2};
VAR13:=BARSLAST(底背离);
VAR14:=REF(LLVBARS(DIFF,VAR7),VAR13);
DLBASE1:=FILTER(BACKSET(底背离,VAR14+1),VAR14+3);
VAR15:=REF(VAR3,VAR13+1)+1;
VAR16:=REF(LLVBARS(DIFF,REF(VAR1,VAR13+VAR15))+1,VAR13+VAR15);
DLBASE2:=FILTER(BACKSET(底背离,VAR13+VAR15+VAR16),VAR13+VAR15+VAR16);
DRAWLINE(DLBASE2,DIFF,DLBASE1,DIFF,0),COLORGREEN;
DRAWICON(底背离,DIFF,1);
Q4:求高手帮写一个大智慧选股公式 MACD指标里的红柱线创60日以来最大值。就是最高的红柱线。
MACD.MACD=HHV(MACD.MACD,60);
Q5:大智慧主力进出线指标的源码代码与计算方法
{主力进出 N:1,100,8;M:1,100,13:1,100,60;S:1,100,3}
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*5.5;
主力开始出: IF(V4<=0,V4,0),COLOR00FF00,LINETHICK2;
主力开始进: IF(V4>=0,V4,0),COLORFF00FF,LINETHICK2;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
大资金进场: IF(VB>=0,VB,0),COLORRED,LINETHICK2;
大资金撤走: IF(VB<=0,VB,0),COLORBLUE,LINETHICK2; 答案被采纳可获得悬赏分和额外20分奖励。
Q6:什么股票软件有免费主力资金线指标
用大智慧吧 它有这功能
Q7:大智慧主力资金公式源代码
ABV,主力进出指标公式源码:
ABV:MA(SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0)/25000,2);
M1:EMA(ABV,N1);
M2:EMA(ABV,N2);
参数 最小 最大 缺省 步长
N1 1 200 12 1
N2 1 200 26 1
本文由锦鲤发布,不代表本站立场,转载联系作者并注明出处:/showinfo-6-310-0.html