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

📄 trend trigger factor.afl

📁 一个更精度的平滑涵数, 可用于股票交易系统.用于Amibroker 平台
💻 AFL
字号:
//------------------------------------------------------------------------------
//
//  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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -