- Июль 7, 2013
- Опубликовано: Команда Форекс Вики
- Категория: Форекс Инд
Имя: |
|
||
Автор: | матрос15 (2009.05.27 08:07) | ||
Скачано: | 6205 | ||
Скачать: |
|
||
MTF MACD is a MetaTrader indicator based on well known MACD. Схождение скользящих средних / Дивергенция, Индикатор технического анализа, созданный Джеральдом Аппелем в 1960-х годах.. Он показывает разницу между быстрой и медленной экспоненциальной скользящей средней. (ЕМА) of closing prices. Additionally it has signal line which is simple moving average (СМА) of main value of indicator. MACD is a trend following indicator, and is designed to identify trend changes. It's generally not recommended in ranging market conditions.
In MetaTrader we have MACD already included as a standard technical indicator. However it can be used only for current timeframe. When we are looking for trend, it is very desirable to have MACD showing higher timeframes. MTF MACD presented here has additional parameter - Временные рамки. You can use it to set up higher timeframe from which MACD will calculate its values. Because values are derived from bars, when using higher timeframes, you will notice rough shape of indicator lines. MTF MACD settings:
Default value is 0 - means current timeframe. For other timeframes: 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=Н4, 1440=D1, 10080=W1, 43200=MN1
Default value is 12. This is fast exponential moving average.
Default value is 26. This is slow exponential moving average.
Default value is 9. This is signal line and it is simple moving average.
Default value is 0 - means Close price used for MA calculations. For other types of price: 0-ЗАКРЫВАТЬ, 1-ОТКРЫТЬ, 2-ВЫСОКИЙ, 3-НИЗКИЙ, 4-МЕДИАНА, 5-ТИПИЧНЫЙ, 6-WEIGHTED.
Default value is 0. This parameter shifts whole indicator by Shift number of bars from set timeframe to the right on the chart. Пример. MTF MACD screenshot |
|||
Привет, ребята One question to the last part of the code (in start function): Any suggestions to how to change this code to get this MTF MACD indicator to draw smoother? Lets say the indicator is used on M1 to draw a M5 MACD (using default setting of 12, 26, 9), the indicator as it is now will reference each close price used in the calculation 5 times until moving to the next closing value (which will be used 5 times again). Thereby getting the stair stepping indicator as displayed in the article. How can this be changed so the indicator at any given time references the next close price on the main timeframe? If on M5 and and MTF MACD set to M15, the indicator should reference current price shift0 and the close price of shift3, shift6, 9 и т. д.. How do I collect and reference an array of prices where the array is defined from HigherTimeFrame/PresentTimeFrame=TFfactor and # of periods in MACD? The array for the FastPeriod (in this case FastPeriod=12) является:
I picture that the benefit is that a higher timeframe MACD value is being updated every time the lower timeframe draws a new bar. Of course it will not draw the exact higher-TF MACD value as if a MACD was plotted on that higher TF. But it will give an earlier zero line crossover, and potentially earlier trade signals. Any comments and help is appreciated. Спасибо. начало() { int limit, iChart, iTF, delta=0; datetime TimeArray[]; если(Временные рамки>Период()) delta=MathCeil(TimeFrame/Period()); int counted_bars = Индикатор подсчитывается(); //---- check for possible errors if(counted_bars<0) возвращаться(-1); //---- the last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars+delta; ArrayCopySeries(TimeArray,MODE_TIME ,Символ(),Временные рамки); iTF=0; для(iChart=0; iChart<ограничение; iChart++) { пока(Время[iChart]<TimeArray[iTF]) iTF++; MainBuffer[iChart]=EMPTY_VALUE; SignalBuffer[iChart]=EMPTY_VALUE; MainBuffer[iChart]=iMACD(Символ(),Временные рамки,FastEMA,S lowEMA,Сигнал,AppliedPrice,MODE_MAI N,iTF+Shift); SignalBuffer[iChart]=iMACD(Символ(),Временные рамки,FastEMA,S lowEMA,Сигнал,AppliedPrice,MODE_SIG NAL,iTF+Shift); } возвращаться(0); } 25.06.2011 13:12 tttechtrader
This is MetaTrader forum. Пожалуйста .. No one here is interested in your literacy. 30.05.2009 05:51 матрос15
marynarz15 wrote:The code I share is entirely mine....
another plagiary and War and Peace - also yours - same book but yours calls "quite different" (Piece and War), characters quite different too - (Pierre changed to Pedro) ... : ))))))))))))))) 30.05.2009 04:38 фххх
Thank you for sharing your opinion. I think you are much more intelligent than me 🙂 30.05.2009 04:23 матрос15
marynarz15 wrote:
I'm glad you posted this code. Now everyone can see that it is quite different... Maryna, you seems like not very bright girl, so again - if you think replacing "я" с "А" и "у"с "Б", TF/Per with "delta" (which is TF/Per) и т. д.. would make it "quite different" - you just offending people intelligence - they not as dumb as you ... think 30.05.2009 03:15 фххх
I'm glad you posted this code. Now everyone can see that it is quite different... 29.05.2009 14:05 матрос15
должно быть: limit=Bars-counted_bars + TimeFrame/Period(); "programer" - you can't read or dum? твой "copyright" - верно, you copied Kerises indi.., stick some minute changes (твой 80% crap) : ))))) btw. it was very first post and Kerises very first mtf ind... Last edited by keris2112; 03-05-2006 в 02:11 ЯВЛЯЮСЬ. - whole thread after that and btw - maryna, i'm not Keris с уважением, фххх //+------------------------------------------------------------------+ #свойство Indicator_separate_window extern int TimeFrame=0; double ExtMapBuffer1[]; int инициализация() TimeFrame=MathMax(Временные рамки,Период()); } возвращаться(0); //+------------------------------------------------------------------+ начало() если(counted_bars<0) возвращаться(-1); ArrayCopySeries(TimeArray,MODE_TIME,Символ(),Временные рамки); limit=Bars-counted_bars + TimeFrame/Period(); для(i=0,y=0;я<ограничение;я++) ExtMapBuffer1[я]=iRSI(НУЛЕВОЙ,Временные рамки,Период RSI,примененная_цена,у) ; } возвращаться(0); 29.05.2009 07:00 фххх
fxxx wrote:
... keris I checked 'your code'... This is what you published: and here we can see how it works: The code looks like this: #авторское право собственности "Авторское право © 2006, Керис2112" double ExtMapBuffer1[]; And it works like this: If you claim copyrights to above code, I see no problem... For twenty lines of code we have 80% difference. And yours is completely crap... 28.05.2009 17:03 матрос15
marynarz15 wrote:
fxxx wrote:
btw. copyright 2006 keris 2112 http://www.forex-tsd.com/indicators-metatrader-4/1077-multi-timeframe-indicators.html The code I share is entirely mine. The code you are refering to is quite different. I wonder if this works all the time, especially if you have gaps.. если (Время[я]<TimeArray[у]) y++; I coded few much more complex multi timeframe indicators to some of my clients and they were very happy, so I thought it would be nice to share some very basic version for free with the world. Thanks for the comment anyway. : )))))))))))) "entirely yours"? what a b.s.; whom you bulshtng? (may be only those, from whom you collect "billing information") basicaly same thing Keris, Igorad: ArrayCopySeries(TimeArray,MODE_TIME,Символ(),Временные рамки); для(я=0, y=0; я<ограничение; я++) ExtMapBuffer1[я]=iRSI(НУЛЕВОЙ,Временные рамки,Период RSI,примененная_цена,у) ; "ты": если(Временные рамки>Период()) delta=MathCeil(TimeFrame/Period()); ArrayCopySeries(TimeArray,MODE_TIME,Символ(),Временные рамки); what is "quite different"?: you called "я" - "iChart", у -"iTF"; "пока" insead of "если"-другой, the rest - same thing : )))))))))) сдвиг (iTF+Shift ) - works too bad; it normaly goes in init: TimeFrame = MathMax(Временные рамки,Период()); |