论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1321回复:1
草龙
注册时间2004-12-17
[MT4指标]iMAX3均线指标
楼主发表于:2014-05-08 14:02只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标, mt4指标类型:趋势指标 是否能用在mt4手机版上:否 是否含有未来函数:无 /*+-------------------------------------------------------------------+ | iMAX3.mq4 | | | | iMAX3 is a "hybrid" indicator based upon my prior works... | | The original "iMAX" indicator and the follow on "iMAXhp" | | indicator. Both indicators phase shift a "Modified Optimum | | Elliptic Filter" ref: | | | | Source of calculations: | | Stocks & Commodities vol 18:7 p20-29 | | Optimal Detrending by John F. Ehlers | | | | Original iMAX indicator: | | | | The MOEF signal was phase shifted by 1 bar period... The base | | phase and shifted phase cross are used to detect fast trends in | | price action. The MOEF signal as used iMAX has extremely useful | | characteristics... it provides fast trend information with | | no adjustments in parameters in all timeframes, and currencies. | | It is extremely resistant to price spikes and holds a valid | | trend in all market conditions... from extemely volatile, until | | price action goes flat. It is not the fastest trend detection | | system, but one of best overall for both speed and stability. | | It is an ideal indicator for general purpose applications | | such as trend change detection/alerts, MTF displays, and | | filters. | | | | The original iMAX indicator was published by me without copyright | | for use in the public domain. Subsequent publications of iMAXhp, | | iMAXhpx, and iMAX3 are copyrighted works. | | | | iMAXhp (high performance) | | | | To improve responsiveness or speed of detection of the iMAX | | indicator the iMAXhp (high perfomance) indicator, swiched from | | frequecy or bar/phase shifting the MOEF signal, to amplitude | | phase shifting. This improves response time by about two bars, | | at the expense of some filtering characteristics, and it | | requires the second phase amplitude be specified... A general | | purpose set of amplitude values is built into this indicator for | | ease of application, and can be adjusted if needed. | | | | For example: Adjustment of the general purpose set of amplitude | | values would be necessary when you are applying the indicator to | | JPY currency pairs, because the JPY currency is so very different | | in it's price compared to other currencies. Amplitude is | | adjusted by varying the Ph1step variable values in the code below.| | An approximate change in value to compensate for price | | difference in the JPY currency would be to multiply the preset | | Ph1step variable values by 100. You can change a Ph1step value, | | recompile the code, and observe the amplitude change using the | | phase lines generated by the indicator in the chart price area. | | | | iMAXhpx | | | | Not publically introduced before... I change the formula for | | Ehlers' calculations slightly, and again boost speed in trend | | detection. | | | | All three modes are built into this indicator, and any, or all | | modes can be used simultaneously. Welcome to iMAX3... | | | | iMAX3 attempts to standardize application of the prior indicators,| | offering the utility of either frequency, or amplitude phase | | shifting. By default this indicator will operate in the original | | bar/phase shifted mode... just drop in on a chart and it works | | well in any timeframe and any currency. For higher speed | | amplitude phase shifted modes, the preset amplitude settings can | | be used, or unique settings specified. | | | | Another good reason for creating this hybrid version is that the | | former frequency and amplitude shifted versions are intrinsically | | 180 degrees out of phase with each other. So, in this version, | | which I intend to base all future work upon, both methods of | | phase shifting are compensated for in terms of phase | | differences... so all future applications can use either method | | of phase shifting interchangeably. If you build an application | | using one method of phase shifting and decide later to change it, | | either for speed advantages, or better filtering characteristics, | | you can use this single indicator without potentially confusing | | phase differences between them. | | | | This indicator changes it's values on the open bar with no other | | modifications to it's bar/price history. | | | | Indicator buffers are not read unless a particular mode is | | specified, so execution speed of this hybrid indicator is on par | | with a dedicated indicator executing a single mode. | | | | Crafted by Wylie | | Copyright ? 2009 | | [email protected] | +-------------------------------------------------------------------+*/ #property copyright "Copyright ? 2009, Wylie" #property link "[email protected]" #property indicator_chart_window #property indicator_buffers 6 #property indicator_color1 Lime #property indicator_color2 HotPink #property indicator_color3 White #property indicator_color4 Orange #property indicator_color5 Aqua #property indicator_color6 Red /*+-------------------------------------------------------------------+ | iMAX3 Parameters | +-------------------------------------------------------------------+*/ extern string _0 = "Select Mode"; extern bool iMAXmode = true; extern bool hpMode = false; extern bool hpxMode = false; extern string _1 = ""; extern string _2 = "Display on chart"; extern bool iMAXPhases = true; extern bool hpPhases = false; extern bool hpxPhases = false; extern string _3 = ""; extern string _4 = "Amplitude shift for hp modes."; extern string _5 = "0.0 = Use internal presets."; extern double Ph1stepHPmodes = 0.0; extern string _6 = ""; extern color hpxPh1color = Lime; extern color hpxPh2color = HotPink; extern string _7 = ""; extern color hpPh1color = White; extern color hpPh2color = Orange; extern string _8 = ""; extern color iMAXph1color = Aqua; extern color iMAXph2color = Red; double iMAX0,iMAX1,hp0,hp1,hpx0,hpx1,Ph1step,x,xhp0,xhp1; int MinBars,c,limit,countedBars; /*+-------------------------------------------------------------------+ | iMAX3 Initialization | +-------------------------------------------------------------------+*/ int init() { IndicatorBuffers(6); if(hpxMode) {SetIndexBuffer(0,hpx0); SetIndexBuffer(1,hpx1); if(hpxPhases) {SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1,hpxPh1color); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1,hpxPh2color);} else {SetIndexStyle(0,DRAW_NONE); SetIndexStyle(1,DRAW_NONE);}} if(hpMode) {SetIndexBuffer(2,hp0); SetIndexBuffer(3,hp1); if(hpPhases) {SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,1,hpPh1color); SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,1,hpPh2color);} else {SetIndexStyle(2,DRAW_NONE); SetIndexStyle(3,DRAW_NONE);}} SetIndexBuffer(4,iMAX0); SetIndexBuffer(5,iMAX1); if(iMAXmode && iMAXPhases) {SetIndexStyle(4,DRAW_LINE,STYLE_SOLID,1,iMAXph1color); SetIndexStyle(5,DRAW_LINE,STYLE_SOLID,1,iMAXph2color);} else {SetIndexStyle(4,DRAW_NONE); SetIndexStyle(5,DRAW_NONE);} if(hpMode || hpxMode) {if(Ph1stepHPmodes == 0.0) {switch(Period()) {case 1: Ph1step = 0.0001; break; case 5: Ph1step = 0.00015; break; case 15: Ph1step = 0.0003; break; case 30: Ph1step = 0.0005; break; case 60: Ph1step = 0.00075; break; case 240: Ph1step = 0.0015; break; case 1440: Ph1step = 0.003; break; case 10080: Ph1step = 0.005; break; case 43200: Ph1step = 0.01; break;}} else {Ph1step = Ph1stepHPmodes;}} MinBars = 20; IndicatorShortName("iMAX3"); return (0); } // int init() /*+-------------------------------------------------------------------+ | iMAX3 Main cycle | +-------------------------------------------------------------------+*/ int start() { if(Bars <= MinBars){return (0);} countedBars = IndicatorCounted(); if(countedBars < 0){return (-1);} if(countedBars > 0){countedBars--;} limit = Bars - countedBars - 1; x = 0.5; c = limit; while(c >= 0) { if(hpxMode) {hpx1[c] = (0.13785 * (2 * ((High[c] + Low[c]) * x) - ((High[c+1] + Low[c+1]) * x))) + (0.0007 * (2 * ((High[c+1] + Low[c+1]) * x) - ((High[c+2] + Low[c+2]) * x))) + (0.13785 * (2 * ((High[c+2] + Low[c+2]) * x) - ((High[c+3] + Low[c+3]) * x))) + (1.2103 * hpx0[c + 1] - 0.4867 * hpx0[c + 2]); if(Close[c] > hpx1[c]) {hpx0[c] = hpx1[c] + Ph1step;} if(Close[c] < hpx1[c]) {hpx0[c] = hpx1[c] - Ph1step;}} if(iMAXmode || hpMode) {iMAX0[c] = (0.13785 * (2 * ((High[c] + Low[c]) * x) - ((High[c+1] + Low[c+1]) * x))) + (0.0007 * (2 * ((High[c+1] + Low[c+1]) * x) - ((High[c+2] + Low[c+2]) * x))) + (0.13785 * (2 * ((High[c+2] + Low[c+2]) * x) - ((High[c+3] + Low[c+3]) * x))) + (1.2103 * iMAX0[c + 1] - 0.4867 * iMAX0[c + 2]); xhp0 = iMAX0[c]; iMAX1[c] = iMAX0[c+1];} if(hpMode) {if(Close[c] > iMAX0[c]) {xhp1 = iMAX0[c] + Ph1step;} if(Close[c] < iMAX0[c]) {xhp1 = iMAX0[c] - Ph1step;} hp0[c] = xhp1;hp1[c] = xhp0;} c--; } // while(c >= 0) return (0); } // int start() /*+-------------------------------------------------------------------+ | End iMAX3 Main cycle | +-------------------------------------------------------------------+*/ iMAX3.jpgiMAX3.jpg
TK29帖子1楼右侧xm竖版广告90-240
个性签名

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

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
Pzxzx
注册时间2017-08-06

本站免责声明:

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

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

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

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

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

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