elder's market thermometer.afl

来自「一个更精度的平滑涵数, 可用于股票交易系统.用于Amibroker 平台」· AFL 代码 · 共 44 行

AFL
44
字号
//------------------------------------------------------------------------------
//
//  Formula Name:    Elder's Market Thermometer
//  Author/Uploader: Noor_Doodie 
//  E-mail:          muhd.noor.sn@gmail.com
//  Date/Time Added: 2006-02-23 12:04:31
//  Origin:          
//  Keywords:        
//  Level:           medium
//  Flags:           indicator
//  Formula URL:     http://www.amibroker.com/library/formula.php?id=594
//  Details URL:     http://www.amibroker.com/library/detail.php?id=594
//
//------------------------------------------------------------------------------
//
//  Juast another ad on to ur evergrowing Elder Library. Hope this works for
//  you guys, tweak it if you need to.
//
//------------------------------------------------------------------------------

_SECTION_BEGIN("Market Thermometer");

H1 = Ref(H, -1);
L1 = Ref(L, -1);

T = IIf(H<H1 AND L>L1, 0, IIf(H-H1>L1-L, H-H1, L1-L));

Val1 = H-H1;
Val2 = L1-L;
Val = IIf(Val1>Val2, Val1, Val2) ;
	

Avgval = Median(Val, 22);

color= IIf (Val < Avgval, colorBlue, IIf(Val >= Avgval AND Val < Avgval * 3, colorViolet, IIf(Val > Avgval * 3, colorOrange, colorViolet)));


Plot(T, _DEFAULT_NAME(), color, styleHistogram | styleThick);
P = ParamField("Price field",-1);
Periods = Param("Periods", 22, 2, 200, 1, 10 );

Plot( EMA( P, Periods ), "EMA 22", colorGreen, styleThick); 

_SECTION_END();

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?