分类
2022年最佳外汇交易工具

MACD和RSI指标的优化

MyTT (My麦语言 T通达信 T同花顺)

MACD + RSI TS

A simple strategy that use EMAs convergence/divergence and RSI peeks to take position. Fractals are really useful to positioning your stop loss.

It works well on commodities and forex markets.

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

通达信MACD结合RSI和KDJ主图指标公式

涨停:=IF(REF(C,1)*1.1-C stICKLINE(涨停,OPEN,CLOSE,4,2),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,0.8,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
ZT:=C/REF(C,1)>1.095;
STICKLINE(ma(CLOSE,5)>REF(MA(CLOSE,5),1) AND ZT,O,C,0.6,0),COLORYELLOW;
STICKLINE(MA(CLOSE,5) VAR6:=REF(C,1);
VAR7:=SMA(MAX(C-VAR6,0),6,1)/SMA(Abs(C-VAR6),6,1)*100;
DRAWTEXT(crOSS(82,VAR7),H*1.02,'逃顶'),COLORYELLOW;

MA5:MA(C,5)COLORYELLOW;
MA10:MA(C,10)COLORGREEN,DOTLINE;
DIF:EMA(CLOSE,7) - EMA(CLOSE,19)NODRAW;
DEA:EMA(DIF,9)NODRAW;
MacD:2*(DIF-DEA),COLORSTICK,NODRAW;
NOTEXTDIF1:MA(C,20)+(MACD.DIF)*3,COLORWHITE,NODRAW;
强:IF(NOTEXTDIF1*1.002>MA(NOTEXTDIF1,2),NOTEXTDIF1,DRAWNULL),COLORRED,LINETHICK3,NODRAW;
NOTEXTDEA1:MA(C,20)+(MACD.DEA)*3,COLORYELLOW,NODRAW;
弱:IF(NOTEXTDEA1>MA(NOTEXTDEA1,2),NOTEXTDEA1,DRAWNULL),COLORMAGENTA,LINETHICK1,NODRAW;
NOTEXTOZ:MA(C,20)COLORBLUE,DOTLINE;
NOTEXTMACD:=MA(C,20)+(MACD.MACD)*3;
DRAWICON(CROSS(NOTEXTDEA1,NOTEXTDIF1),NOTEXTDEA1*1.003,27);>
A:=REF(NOTEXTDIF1,1)REF(NOTEXTDIF1,MACD和RSI指标的优化 1);
B:=REF(NOTEXTDIF1,1)>REF(NOTEXTDIF1,2) AND REF(NOTEXTDIF1,2)>REF(NOTEXTDIF1,3) AND NOTEXTDIF1 DRAWICON(B,NOTEXTDEA1,2);>
STICKLINE(MACD>REF(MACD,1) AND MACD>0,NOTEXTOZ,NOTEXTMACD,0,-1),COLORRED;
STICKLINE(NOTEXTMACD>=NOTEXTOZ AND MACD>REF(MACD,1),NOTEXTOZ,NOTEXTMACD,0,-1),COLORRED;
STICKLINE(MACD0,NOTEXTOZ,NOTEXTMACD,0,-1),COLORYELLOW;
TC1:=IF(H=HHV(H,48),H,DRAWNULL);
TC2:=CONST(BArslAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,48),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
LP:=CURRBARSCOUNT HP:=CURRBARSCOUNT 底:=IF(LP,150,0),COLORMAGENTA;
DRAWICON(FILTER(底,10),L*0.925,1);

STICKLINE(NOTEXTMACD STICKLINE(MACD>=REF(MACD,1) AND MACD <0,NOTEXTOZ,NOTEXTMACD,0,-1),COLORMAGENTA;
;

N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,NODRAW;
K:=SMA(RSV,M1,1),NODRAW;
D:=SMA(K,M2,1),NODRAW;
J:=3*K-2*D,NODRAW;
CJ_K:=MA(K,15),LINETHICK2,NODRAW;
CJ_D:=MA(D,15),LINETHICK2,NODRAW;
CJ_J:=MA(J,15),LINETHICK2,NODRAW;
DRAWICON(CROSS(CJ_K,CJ_D)&&CJ_D <30,L*0.92,11);
DRAWICON(CROSS(CJ_D,CJ_K)&&CJ_D>70,H*1.05,MACD和RSI指标的优化 12);
DRAWICON(CROSS(cci,-100),L*0.98,1);
DRAWICON(CROSS(CCI,0),L*0.98,1);
DRAWICON(CROSS(CCI,100),L*0.98,1);
DRAWICON(CROSS(100,CCI),H*1.02,2);
;
PT1:=CONST(HHV(H,20))/1.2;
IF(CURRBARSCOUNT <=10,PT1,DRAWNULL),COLORGREEN;
DRAWTEXT(ISLASTBAR,PT1,'回马枪观测'),COLORWHITE;
PT2:=CONST(HHV(H,10))/1.2;
IF(CURRBARSCOUNT <=10,PT2,DRAWNULL),COLORGREEN;
DRAWTEXT(ISLASTBAR,PT2,'回马枪观测'),COLORWHITE;

tranzwalle/MyTTx

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If MACD和RSI指标的优化 nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace MACD和RSI指标的优化 will open once ready.

There was a problem preparing your codespace, please try again.

This branch is not ahead of the upstream mpquant:main.

No new commits yet. Enjoy your day!

Latest commit

Git MACD和RSI指标的优化 stats

Files

Failed to load latest commit information.

README.md

MyTT (My麦语言 T通达信 T同花顺)

MyTT是您量化工具箱里的瑞士军刀,精炼而高效,它将通达信,同花顺,文华麦语言等指标公式indicators,最简移植到Python中,核心库单个文件,仅百行代码,实现和转换同花顺通达信所有常见指标MACD,RSI,BOLL,ATR,KDJ,CCI,PSY等,全部基于numpy和pandas的函数封装,简洁且高性能,能非常方便的应用在各自股票股市技术分析,股票自动程序化交易,数字货币BTC等量化等领域.Mini Python library with most stock market indicators.

tranzwalle/MyTTx

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Use Git or checkout MACD和RSI指标的优化 with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download MACD和RSI指标的优化 Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

This branch is not ahead of the upstream mpquant:main.

No new commits yet. Enjoy your day!

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

MyTT (My麦语言 T通达信 T同花顺)

MyTT是您量化工具箱里的瑞士军刀,精炼而高效,它将通达信,同花顺,文华麦语言等指标公式indicators,最简移植到Python中,核心库单个文件,仅百行代码,MACD和RSI指标的优化 实现和转换同花顺通达信所有常见指标MACD,RSI,BOLL,ATR,KDJ,CCI,PSY等,全部基于numpy和pandas的函数封装,简洁且高性能,能非常方便的应用在各自股票股市技术分析,股票自动程序化交易,数字货币BTC等量化等领域.Mini Python library with most stock market indicators.