trend trigger factor.afl
来自「一个更精度的平滑涵数, 可用于股票交易系统.用于Amibroker 平台」· AFL 代码 · 共 39 行
AFL
39 行
//------------------------------------------------------------------------------
//
// Formula Name: Trend Trigger Factor
// Author/Uploader: Kelly Griffiths
// E-mail:
// Date/Time Added: 2004-11-10 01:35:58
// Origin: Stocks and Commodities (Dec04)
// Keywords: trend buy power sell trigger factor
// Level: basic
// Flags: system,indicator,function
// Formula URL: http://www.amibroker.com/library/formula.php?id=400
// Details URL: http://www.amibroker.com/library/detail.php?id=400
//
//------------------------------------------------------------------------------
//
// Allows you to follow the trend.
//
//------------------------------------------------------------------------------
function TTF( periods )
{
BuyPower = HHV( High, periods ) - Ref( LLV( Low, periods ), -periods );
SellPower = Ref( HHV( High, periods ), -periods ) - LLV( Low, periods );
return 100 * (BuyPower - SellPower) / (0.5 * (BuyPower + SellPower));
}
ttf15 = TTF( 15 );
Plot( ttf15, "TTF(15)", colorRed );
bt = Optimize( "Buy Trigger", 125, 35, 150, 5 );
st = Optimize( "Sell Trigger", -40, -100, 25, 5 );
Buy = Cross( ttf15, bt );
Sell = Cross( -st, ttf15 );
Short = Sell;
Cover = Buy;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?