论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1379回复:5
草龙
注册时间2004-12-17
[MT4指标]FAMAMrPip指标
楼主发表于:2014-09-21 16:03只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标 mt4指标类型:趋势指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| | //| Copyright ? 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ // // Description: Fractal Adaptive Moving Average - by John Ehlers // Version 1.0 8/9/2005 // Notes: // October 2005 Issue - \"FRAMA - Fractal Adaptive Moving Average\" // Length will be forced to be an even number. Odd numbers will be bumped up to the // next even number. // Formula Parameters: Defaults: // RPeriod 16 #property copyright \"Copyright ? 2005, MrPip \" #property link \"http://www.metaquotes.net/\" //---- indicator settings #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Red //---- buffers double ExtMapBuffer1; extern int RPeriod = 60; int shift; int loopbegin; double Filt_1 = 0; //previous bar\'s Filt //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- 1 additional buffers are used for counting. IndicatorBuffers(1); //---- drawing settings SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexShift(0,0); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)); //---- initialization done return(0); } int start() { if (Bars < RPeriod) return(0); Comment(\"Bars : \",Bars); loopbegin = Bars - RPeriod - 1; Filt_1=Close[loopbegin]; for(shift = loopbegin; shift >= 0; shift--) { Filt_1 = FAMA(); // if (shift < RPeriod+1) Filt = Close[shift]; //========== COLOR CODING =========================================== ExtMapBuffer1[shift] = Filt_1; } // done return (0); } double FAMA() { double Filt = 0; int count = 0; int tmp = 0; int N = 0; int HalfN = 0; double N1 = 0; double N2 = 0; double N3 = 0; double HH = 0; double LL = 0; double Dimen = 0; double alpha = 0; N = MathFloor(RPeriod/2)*2; // Force N to even number HalfN = MathFloor(N/2); N3 = (High[Highest(NULL,0,MODE_HIGH,shift + N-1, shift)] - Low[Lowest(NULL,0,MODE_LOW,shift + N-1, shift)]) / N; // Print(\"High \",High[Highest(NULL,0,MODE_HIGH,shift+N, shift)],\"Low \",Low[Lowest(NULL,0,MODE_LOW,shift+N, shift)]); HH = High[shift+N-1]; LL = Low[shift+N-1]; // First half for( count = 0; count <= (HalfN -1); count++) { tmp = shift + count; if (High[tmp] > HH) HH = High[tmp]; if (Low[tmp] < LL) LL = Low[tmp]; } N1 = (HH - LL) / HalfN; HH = High[shift+HalfN-1]; LL = Low[shift+HalfN-1]; // Second half for (count = HalfN; count <= (N-1); count++) { tmp = shift + count; if (High[tmp] > HH) HH = High[tmp]; if (Low[tmp] < LL) LL = Low[tmp]; } N2 = (HH - LL) / HalfN; if (N1 > 0 && N2 > 0 && N3 > 0) { Dimen = (MathLog(N1 + N2) - MathLog(N3)) / MathLog(2); } alpha = MathExp(-4.6*(Dimen - 1)); if (alpha < 0.01) alpha = 0.01; if (alpha > 1) alpha = 1; Filt = (alpha*Close[shift]) + (1 - alpha)*Filt_1; return (Filt); } //+------------------------------------------------------------------+
TK29帖子1楼右侧xm竖版广告90-240
个性签名

阅尽天下指标
搬砖开始,始于2014

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
nbakt
注册时间2016-08-23
发表于:2016-09-27 15:02只看该作者
3楼
没图啊!!!!!!!!!!!
dbcwb
注册时间2015-08-29
发表于:2016-10-12 15:55只看该作者
4楼
谢谢分享,先顶后看
polomachine
注册时间2015-07-20
发表于:2016-10-14 14:02只看该作者
5楼
好东西,感谢分享。
goodday
注册时间2016-12-06
发表于:2016-12-07 11:26只看该作者
6楼
谢谢楼主分享

本站免责声明:

1、本站所有广告及宣传信息均与韬客无关,如需投资请依法自行决定是否投资、斟酌资金安全及交易亏损风险;

2、韬客是独立的、仅为投资者提供交流的平台,网友发布信息不代表韬客的观点与意思表示,所有因网友发布的信息而造成的任何法律后果、风险与责任,均与韬客无关;

3、金融交易存在极高法律风险,未必适合所有投资者,请不要轻信任何高额投资收益的诱导而贸然投资;投资保证金交易导致的损失可能超过您投入的资金和预期。请您考虑自身的投资经验及风险承担能力,进行合法、理性投资;

4、所有投资者的交易帐户应仅限本人使用,不应交由第三方操作,对于任何接受第三方喊单、操盘、理财等操作的投资和交易,由此导致的任何风险、亏损及责任由投资者个人自行承担;

5、韬客不隶属于任何券商平台,亦不受任何第三方控制,韬客不邀约客户投资任何保证金交易,不接触亦不涉及投资者的任何资金及账户信息,不代理任何交易操盘行为,不向客户推荐任何券商平台,亦不存在其他任何推荐行为。投资者应自行选择券商平台,券商平台的任何行为均与韬客无关。投资者注册及使用韬客即表示其接受和认可上述声明,并自行承担法律风险。

版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]