美联储加息25个基点并暗示暂停,鲍威尔称“现在降息为时过早”
1. JS日历算法怎么写?主要是排日期哪里!1-31号怎么排?
数组,包括公历的月份天数、农历及节气等等,都用的是数组,网上有JS源码.
2. JS日历算法怎么写?主要是排日期哪里!1-31号怎么排?
数组,包括公历的月份天数、农历及节气等等,都用的是数组,网上有JS源码.
3. JS日历算法怎么写?主要是排日期哪里!1-31号怎么排?
数组,包括公历的月份天数、农历及节气等等,都用的是数组,网上有JS源码.
4. JS日历算法怎么写?主要是排日期哪里!1-31号怎么排?
数组,包括公历的月份天数、农历及节气等等,都用的是数组,网上有JS源码.
5. dmi趋向指标公式?
股票走势的技术指标中,有趋势类、摆动类、能量类的指标,而DMI就是其中的一种经典的趋势指标,在实战中能够帮助投资者识别价格的趋势变化以及其中蕴含的买卖点位置,为了能够更加清晰的了解指标的应用技巧,我们从其源码公式进行学习。
首先我们来看一下具有顶底识别以及抄底逃顶作用的指标源码的编译:
【顶底DMI】
TR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),7);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),7);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),7);
PDI: DMP*100/TR;
MDI: DMM*100/TR;
ADX: EMA(ABS(MDI-PDI)/(MDI+PDI)*100,7);
ADXR:EMA(ADX,7);
抄底1:COUNT(PDI50,1) AND REF(ADX,1)>=REF(ADX,2) AND
ADX
逃顶1:=COUNT(PDI>MDI,3)=3 AND REF(ADX>50,1) AND REF(ADX,1)>=REF(ADX,2) AND
ADX
五十:50;
三十:30;
二十:20;
DRAWTEXT(抄底1,PDI,'抄底');
DRAWTEXT(逃顶1,ADX,'逃顶');
顶底dmi
从源码和走势图形中我们可以看出,其中指标线包含有PDI、ndi、adx等走势,具体的操作用法,请点击DMI指标,在这里主要讲解的是其源码公式的编译,以及简单的走势分析。
其次,我们可以通过其源码公式的展示,寻找指标线中的买入点位置:
【dmi买点】
{参数n14,m6}
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/TR;
MDI: DMM*100/TR;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
穿破短底:16;
线上发飙:30;
{2}预警:IF(ADX>90 AND PDI=0,30,0),COLORYELLOW,LINETHICK2;
买:IF(CROSS(PDI,MDI) AND (C >1.05*REF(C,1) OR REF(C,1)>1.05*REF(C,2)) AND (V>2*REF(V,1) OR REF(V,1)>2*REF(V,2))AND MA(V,5)>MA(V,60) ,20,0),COLORRED,LINETHICK2;
买2:IF(CROSS(PDI,MDI) AND COUNT(预警,10)>=1,10,0),COLORMAGENTA,LINETHICK3;
0;
{6}
RSV9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV9,3,1);
DK1:=K1-REF(K1,1),COLORSTICK;
出手就赢:IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0), STICK,COLORYELLOW;DRAWICON(出手就赢>0,50 ,1);
dmi买点
依据其指标线的走势形态,在股价的K线走势图中能够清楚的表现出,投资者应该买入以及卖出的获利点位置,希望投资者能够从中做好应对的操作策略。
【dmi组合】
VAR1:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
牛:SMA(VAR1,7,1);
VAR2:=SMA(牛,5,1);
熊:IF(CROSS(牛,VAR2) AND CROSS(MA(C,5),MA(C,13) AND 牛>50),VAR2*2,VAR2);
DRAWBAND(牛,RGB(205,92,92),熊,RGB(28,134,238));
N:=14;M:=6;
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:DMP*100/TR COLORMAGENTA;
MDI:=DMM*100/TR COLORGREEN;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
STICKLINE(ADX>=ADXR,ADX,ADXR,3,0),COLOR800040;
STICKLINE(ADX
关注:STICKLINE(BARSLAST(CROSS(MDI,PDI))<5 AND MDI>PDI AND ADXADXR*0.97,ADX,ADXR,2,0) COLORRED;
10;90;
FVAR1:=REF(CLOSE,2);
会员专用: SMA(MAX(CLOSE-FVAR1,0),7,1)/SMA(ABS(CLOSE-FVAR1),7,1)*100,COLORYELLOW;
{一、PDI>MDI且趋势向上;二、ADX;ADXR在PDI及MDI中间金叉 }
走强:DRAWTEXT(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1),ADXR*0.98,'走强'),COLORYELLOW;
6. obv公式源码?
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MOBV/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,'高');
DRAWTEXT(ZZ,(MOBV/10)*7,'本'),COLORBLUE;
DRAWTEXT(ZZ,MOBV/10,'高'),COLORBLUE;
DRAWTEXT(BDTJ,(MOBV/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MOBV/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
7. dmi趋向指标公式?
股票走势的技术指标中,有趋势类、摆动类、能量类的指标,而DMI就是其中的一种经典的趋势指标,在实战中能够帮助投资者识别价格的趋势变化以及其中蕴含的买卖点位置,为了能够更加清晰的了解指标的应用技巧,我们从其源码公式进行学习。
首先我们来看一下具有顶底识别以及抄底逃顶作用的指标源码的编译:
【顶底DMI】
TR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),7);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),7);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),7);
PDI: DMP*100/TR;
MDI: DMM*100/TR;
ADX: EMA(ABS(MDI-PDI)/(MDI+PDI)*100,7);
ADXR:EMA(ADX,7);
抄底1:COUNT(PDI50,1) AND REF(ADX,1)>=REF(ADX,2) AND
ADX
逃顶1:=COUNT(PDI>MDI,3)=3 AND REF(ADX>50,1) AND REF(ADX,1)>=REF(ADX,2) AND
ADX
五十:50;
三十:30;
二十:20;
DRAWTEXT(抄底1,PDI,'抄底');
DRAWTEXT(逃顶1,ADX,'逃顶');
顶底dmi
从源码和走势图形中我们可以看出,其中指标线包含有PDI、ndi、adx等走势,具体的操作用法,请点击DMI指标,在这里主要讲解的是其源码公式的编译,以及简单的走势分析。
其次,我们可以通过其源码公式的展示,寻找指标线中的买入点位置:
【dmi买点】
{参数n14,m6}
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/TR;
MDI: DMM*100/TR;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
穿破短底:16;
线上发飙:30;
{2}预警:IF(ADX>90 AND PDI=0,30,0),COLORYELLOW,LINETHICK2;
买:IF(CROSS(PDI,MDI) AND (C >1.05*REF(C,1) OR REF(C,1)>1.05*REF(C,2)) AND (V>2*REF(V,1) OR REF(V,1)>2*REF(V,2))AND MA(V,5)>MA(V,60) ,20,0),COLORRED,LINETHICK2;
买2:IF(CROSS(PDI,MDI) AND COUNT(预警,10)>=1,10,0),COLORMAGENTA,LINETHICK3;
0;
{6}
RSV9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV9,3,1);
DK1:=K1-REF(K1,1),COLORSTICK;
出手就赢:IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0), STICK,COLORYELLOW;DRAWICON(出手就赢>0,50 ,1);
dmi买点
依据其指标线的走势形态,在股价的K线走势图中能够清楚的表现出,投资者应该买入以及卖出的获利点位置,希望投资者能够从中做好应对的操作策略。
【dmi组合】
VAR1:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
牛:SMA(VAR1,7,1);
VAR2:=SMA(牛,5,1);
熊:IF(CROSS(牛,VAR2) AND CROSS(MA(C,5),MA(C,13) AND 牛>50),VAR2*2,VAR2);
DRAWBAND(牛,RGB(205,92,92),熊,RGB(28,134,238));
N:=14;M:=6;
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:DMP*100/TR COLORMAGENTA;
MDI:=DMM*100/TR COLORGREEN;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
STICKLINE(ADX>=ADXR,ADX,ADXR,3,0),COLOR800040;
STICKLINE(ADX
关注:STICKLINE(BARSLAST(CROSS(MDI,PDI))<5 AND MDI>PDI AND ADXADXR*0.97,ADX,ADXR,2,0) COLORRED;
10;90;
FVAR1:=REF(CLOSE,2);
会员专用: SMA(MAX(CLOSE-FVAR1,0),7,1)/SMA(ABS(CLOSE-FVAR1),7,1)*100,COLORYELLOW;
{一、PDI>MDI且趋势向上;二、ADX;ADXR在PDI及MDI中间金叉 }
走强:DRAWTEXT(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1),ADXR*0.98,'走强'),COLORYELLOW;
8. dmi趋向指标公式?
股票走势的技术指标中,有趋势类、摆动类、能量类的指标,而DMI就是其中的一种经典的趋势指标,在实战中能够帮助投资者识别价格的趋势变化以及其中蕴含的买卖点位置,为了能够更加清晰的了解指标的应用技巧,我们从其源码公式进行学习。
首先我们来看一下具有顶底识别以及抄底逃顶作用的指标源码的编译:
【顶底DMI】
TR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),7);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),7);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),7);
PDI: DMP*100/TR;
MDI: DMM*100/TR;
ADX: EMA(ABS(MDI-PDI)/(MDI+PDI)*100,7);
ADXR:EMA(ADX,7);
抄底1:COUNT(PDI50,1) AND REF(ADX,1)>=REF(ADX,2) AND
ADX
逃顶1:=COUNT(PDI>MDI,3)=3 AND REF(ADX>50,1) AND REF(ADX,1)>=REF(ADX,2) AND
ADX
五十:50;
三十:30;
二十:20;
DRAWTEXT(抄底1,PDI,'抄底');
DRAWTEXT(逃顶1,ADX,'逃顶');
顶底dmi
从源码和走势图形中我们可以看出,其中指标线包含有PDI、ndi、adx等走势,具体的操作用法,请点击DMI指标,在这里主要讲解的是其源码公式的编译,以及简单的走势分析。
其次,我们可以通过其源码公式的展示,寻找指标线中的买入点位置:
【dmi买点】
{参数n14,m6}
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/TR;
MDI: DMM*100/TR;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
穿破短底:16;
线上发飙:30;
{2}预警:IF(ADX>90 AND PDI=0,30,0),COLORYELLOW,LINETHICK2;
买:IF(CROSS(PDI,MDI) AND (C >1.05*REF(C,1) OR REF(C,1)>1.05*REF(C,2)) AND (V>2*REF(V,1) OR REF(V,1)>2*REF(V,2))AND MA(V,5)>MA(V,60) ,20,0),COLORRED,LINETHICK2;
买2:IF(CROSS(PDI,MDI) AND COUNT(预警,10)>=1,10,0),COLORMAGENTA,LINETHICK3;
0;
{6}
RSV9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV9,3,1);
DK1:=K1-REF(K1,1),COLORSTICK;
出手就赢:IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0), STICK,COLORYELLOW;DRAWICON(出手就赢>0,50 ,1);
dmi买点
依据其指标线的走势形态,在股价的K线走势图中能够清楚的表现出,投资者应该买入以及卖出的获利点位置,希望投资者能够从中做好应对的操作策略。
【dmi组合】
VAR1:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
牛:SMA(VAR1,7,1);
VAR2:=SMA(牛,5,1);
熊:IF(CROSS(牛,VAR2) AND CROSS(MA(C,5),MA(C,13) AND 牛>50),VAR2*2,VAR2);
DRAWBAND(牛,RGB(205,92,92),熊,RGB(28,134,238));
N:=14;M:=6;
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:DMP*100/TR COLORMAGENTA;
MDI:=DMM*100/TR COLORGREEN;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
STICKLINE(ADX>=ADXR,ADX,ADXR,3,0),COLOR800040;
STICKLINE(ADX
关注:STICKLINE(BARSLAST(CROSS(MDI,PDI))<5 AND MDI>PDI AND ADXADXR*0.97,ADX,ADXR,2,0) COLORRED;
10;90;
FVAR1:=REF(CLOSE,2);
会员专用: SMA(MAX(CLOSE-FVAR1,0),7,1)/SMA(ABS(CLOSE-FVAR1),7,1)*100,COLORYELLOW;
{一、PDI>MDI且趋势向上;二、ADX;ADXR在PDI及MDI中间金叉 }
走强:DRAWTEXT(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1),ADXR*0.98,'走强'),COLORYELLOW;
9. obv公式源码?
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MOBV/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,'高');
DRAWTEXT(ZZ,(MOBV/10)*7,'本'),COLORBLUE;
DRAWTEXT(ZZ,MOBV/10,'高'),COLORBLUE;
DRAWTEXT(BDTJ,(MOBV/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MOBV/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
10. obv公式源码?
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MOBV/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,'高');
DRAWTEXT(ZZ,(MOBV/10)*7,'本'),COLORBLUE;
DRAWTEXT(ZZ,MOBV/10,'高'),COLORBLUE;
DRAWTEXT(BDTJ,(MOBV/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MOBV/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
11. psy指标公式源码?
1、PSY=N日内上涨天数/N*100
2、PSYMA=PSY的M日简单移动平均
3、参数N设置为12日,参数M设置为6日.PSY指标与成交量变异率(VR)应配合使用,确定短期买卖点,可以找出每一波的高低点。另外,PSY指标最好与K线互相对照,如此更能从股价变动中了解超买或超卖的情况。在股市的几个指标里占很小比重。
12. psy指标公式源码?
1、PSY=N日内上涨天数/N*100
2、PSYMA=PSY的M日简单移动平均
3、参数N设置为12日,参数M设置为6日.PSY指标与成交量变异率(VR)应配合使用,确定短期买卖点,可以找出每一波的高低点。另外,PSY指标最好与K线互相对照,如此更能从股价变动中了解超买或超卖的情况。在股市的几个指标里占很小比重。
13. psy指标公式源码?
1、PSY=N日内上涨天数/N*100
2、PSYMA=PSY的M日简单移动平均
3、参数N设置为12日,参数M设置为6日.PSY指标与成交量变异率(VR)应配合使用,确定短期买卖点,可以找出每一波的高低点。另外,PSY指标最好与K线互相对照,如此更能从股价变动中了解超买或超卖的情况。在股市的几个指标里占很小比重。
14. dmi趋向指标公式?
股票走势的技术指标中,有趋势类、摆动类、能量类的指标,而DMI就是其中的一种经典的趋势指标,在实战中能够帮助投资者识别价格的趋势变化以及其中蕴含的买卖点位置,为了能够更加清晰的了解指标的应用技巧,我们从其源码公式进行学习。
首先我们来看一下具有顶底识别以及抄底逃顶作用的指标源码的编译:
【顶底DMI】
TR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),7);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),7);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),7);
PDI: DMP*100/TR;
MDI: DMM*100/TR;
ADX: EMA(ABS(MDI-PDI)/(MDI+PDI)*100,7);
ADXR:EMA(ADX,7);
抄底1:COUNT(PDI50,1) AND REF(ADX,1)>=REF(ADX,2) AND
ADX
逃顶1:=COUNT(PDI>MDI,3)=3 AND REF(ADX>50,1) AND REF(ADX,1)>=REF(ADX,2) AND
ADX
五十:50;
三十:30;
二十:20;
DRAWTEXT(抄底1,PDI,'抄底');
DRAWTEXT(逃顶1,ADX,'逃顶');
顶底dmi
从源码和走势图形中我们可以看出,其中指标线包含有PDI、ndi、adx等走势,具体的操作用法,请点击DMI指标,在这里主要讲解的是其源码公式的编译,以及简单的走势分析。
其次,我们可以通过其源码公式的展示,寻找指标线中的买入点位置:
【dmi买点】
{参数n14,m6}
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/TR;
MDI: DMM*100/TR;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
穿破短底:16;
线上发飙:30;
{2}预警:IF(ADX>90 AND PDI=0,30,0),COLORYELLOW,LINETHICK2;
买:IF(CROSS(PDI,MDI) AND (C >1.05*REF(C,1) OR REF(C,1)>1.05*REF(C,2)) AND (V>2*REF(V,1) OR REF(V,1)>2*REF(V,2))AND MA(V,5)>MA(V,60) ,20,0),COLORRED,LINETHICK2;
买2:IF(CROSS(PDI,MDI) AND COUNT(预警,10)>=1,10,0),COLORMAGENTA,LINETHICK3;
0;
{6}
RSV9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV9,3,1);
DK1:=K1-REF(K1,1),COLORSTICK;
出手就赢:IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0), STICK,COLORYELLOW;DRAWICON(出手就赢>0,50 ,1);
dmi买点
依据其指标线的走势形态,在股价的K线走势图中能够清楚的表现出,投资者应该买入以及卖出的获利点位置,希望投资者能够从中做好应对的操作策略。
【dmi组合】
VAR1:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
牛:SMA(VAR1,7,1);
VAR2:=SMA(牛,5,1);
熊:IF(CROSS(牛,VAR2) AND CROSS(MA(C,5),MA(C,13) AND 牛>50),VAR2*2,VAR2);
DRAWBAND(牛,RGB(205,92,92),熊,RGB(28,134,238));
N:=14;M:=6;
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:DMP*100/TR COLORMAGENTA;
MDI:=DMM*100/TR COLORGREEN;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
STICKLINE(ADX>=ADXR,ADX,ADXR,3,0),COLOR800040;
STICKLINE(ADX
关注:STICKLINE(BARSLAST(CROSS(MDI,PDI))<5 AND MDI>PDI AND ADXADXR*0.97,ADX,ADXR,2,0) COLORRED;
10;90;
FVAR1:=REF(CLOSE,2);
会员专用: SMA(MAX(CLOSE-FVAR1,0),7,1)/SMA(ABS(CLOSE-FVAR1),7,1)*100,COLORYELLOW;
{一、PDI>MDI且趋势向上;二、ADX;ADXR在PDI及MDI中间金叉 }
走强:DRAWTEXT(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1),ADXR*0.98,'走强'),COLORYELLOW;
15. obv公式源码?
MOBV:=OBV-MA(OBV,30);
W1:STICKLINE(MOBV>0,MOBV,0,3,1),COLORRED;
W2:STICKLINE(MOBV<0,MOBV,0,3,1),COLORCYAN;
VA1:=HHVBARS(MOBV,BARSLAST(MOBV<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MOBV),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MOBV) OR (ISLASTBAR AND MOBV>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MOBV,REF(VA2,1),REF(MOBV,1),1),COLORMAGENTA;
VA3:=LLVBARS(MOBV,BARSLAST(MOBV>0)+1);
VA4:=CROSS(BACKSET(CROSS(MOBV,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MOBV),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MOBV,REF(VA4,1),REF(MOBV,1),1);
BDTJ:=IF(MOBV<0,FILTERX(MOBV=LLV(MOBV,BARSLAST(MOBV>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MOBV<CONST(LLV(MOBV,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MOBV,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MOBV>本低/2 AND MOBV<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
终点:=IF(ISLASTBAR AND MOBV>0 AND MOBV=HHV(MOBV,BARSLAST(MOBV<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MOBV>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MOBV,REF(ZZ,1),REF(MOBV,1),1),COLORWHITE;
横线:=CONST(REF(MOBV,BARSLAST(ZZ)));
WW:=MOBV>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天数:=BARSLAST(起始点),COLORYELLOW,NODRAW;
上横线:=DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE;
下横线:=DRAWLINE(BDZH,CONST(LLV(MOBV,BD+1)),BDTJ=1,MOBV,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MOBV,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上横线*1.1,天数);
TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL);
红柱数量:=IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MOBV>0,天数),DRAWNULL),COLORWHITE,NODRAW;
横线起始价:=REF(C,天数),NODRAW;
空间评估:=(横线起始价-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MOBV<本高/2 AND MOBV>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(CROSS(MOBV<本高/2,0.5))>0 AND MOBV>(前高+本高)/2,MOBV,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MOBV>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1),DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估,DRAWNULL),2));
STICKLINE(MOBV>前高,MOBV,前高,1,0),COLORYELLOW;
STICKLINE(WQG,MOBV,0,1,0),COLORGREEN;
STICKLINE(MOBV<0 AND MOBV<前低 AND 前低<0,MOBV,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MOBV<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MOBV>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MOBV<前低 AND MOBV<0,MOBV,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MOBV,0,1,0),COLORWHITE;
STICKLINE(MOBV>前高 AND 本高>前高 AND BARSLAST(WQG)>0,MOBV,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MOBV/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MOBV/10,'高');
DRAWTEXT(ZZ,(MOBV/10)*7,'本'),COLORBLUE;
DRAWTEXT(ZZ,MOBV/10,'高'),COLORBLUE;
DRAWTEXT(BDTJ,(MOBV/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MOBV/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
16. psy指标公式源码?
1、PSY=N日内上涨天数/N*100
2、PSYMA=PSY的M日简单移动平均
3、参数N设置为12日,参数M设置为6日.PSY指标与成交量变异率(VR)应配合使用,确定短期买卖点,可以找出每一波的高低点。另外,PSY指标最好与K线互相对照,如此更能从股价变动中了解超买或超卖的情况。在股市的几个指标里占很小比重。