⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 polarized fractal efficiency.afl

📁 一个更精度的平滑涵数, 可用于股票交易系统.用于Amibroker 平台
💻 AFL
字号:
//------------------------------------------------------------------------------
//
//  Formula Name:    Polarized Fractal Efficiency
//  Author/Uploader: jparent 
//  E-mail:          jparent@nobid.com
//  Date/Time Added: 2002-02-24 22:15:45
//  Origin:          
//  Keywords:        
//  Level:           medium
//  Flags:           indicator
//  Formula URL:     http://www.amibroker.com/library/formula.php?id=165
//  Details URL:     http://www.amibroker.com/library/detail.php?id=165
//
//------------------------------------------------------------------------------
//
//  vbscript function to calculate PFE indicator for your array
//
//------------------------------------------------------------------------------

EnableScript("vbscript");
<%
function PFE(V,n,s)
dim result()
redim result(UBound(V))

for i=1 to n-1
x=x+sqr((V(i)-V(i-1))^2+1)
next

for i=n to UBound(V)
x=x+sqr((V(i)-V(i-1))^2+1)-sqr((V(i-n+1)-V(i-n))^2+1)
sign=(V(i)<V(i-n+1))*2+1
result(i)=100*sign*sqr((V(i)-V(i-n+1))^2+n^2)/x
next

smooth=2/(s+1)

for i=n to UBound(V)
result(i)=smooth*result(i)+(1-smooth)*result(i-1)
next

PFE=result
end function
%>
script=GetScriptObject();
Graph0=script.PFE(C,10,5);

⌨️ 快捷键说明

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