Indicators: MTF MACD

 

MTF MACD:

Multi timeframe MACD - has additional parameter - TimeFrame. You can use it to set up higher timeframe from which MACD will calculate its values.

Author: Rafal Dubiel

 

: )))))))))))))))

you forgot to mention: to see attachements on your site (mqlservice) ppl have to register, provide name, address, zip, some "billing information" b.s.

 
 

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..

if (Time[i]<TimeArray[y]) 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.

 
fxxx:

: )))))))))))))))

you forgot to mention: to see attachements on your site (mqlservice) ppl have to register, provide name, address, zip, some "billing information" b.s.

Thanks, that is good point. Now you can download all free stuff on my website without registering.

 
marynarz15:

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..

if (Time[i]<TimeArray[y]) 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,Symbol(),TimeFrame);
limit = Bars - counted_bars;
limit = MathMax ( limit, TimeFrame/Period() ); // limit=Bars-counted_bars + TimeFrame/Period();

for(i=0, y=0; i<limit; i++)
{ if (Time[i]<TimeArray[y]) y++;

ExtMapBuffer1[i]=iRSI(NULL,TimeFrame,RSIperiod,applied_price,y) ;
----------------------

"you":

if(TimeFrame>Period()) delta=MathCeil(TimeFrame/Period());
limit=Bars-counted_bars+delta;

ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);
iTF=0;
for(iChart=0; iChart<limit; iChart++)
{ while(Time[iChart]<TimeArray[iTF]) iTF++; ...
ExtMapBuffer1[iChart]=iRSI(Symbol(),TimeFrame,RSIPeriod,Applied_price, iTF+Shift);

what is "quite different"?: you called "i" - "iChart", y -"iTF"; "while" insead of "if"-different, the rest - same thing : ))))))))))
------------------------------

shift (iTF+Shift ) - works too bad; it normaly goes in init:

TimeFrame = MathMax(TimeFrame,Period());
SetIndexShift(0,shift*TimeFrame/Period());

 
fxxx:

...


keris I checked 'your code'...

This is what you published:

http://www.forex-tsd.com/attachments/indicators-metatrader-4/4150d1140475808-multi-timeframe-indicators-mtf-set-1.zip

and here we can see how it works:

http://www.forex-tsd.com/attachments/indicators-metatrader-4/4155d1140478448-multi-timeframe-indicators-mtf-example.gif

The code looks like this:

#property copyright "Copyright © 2006, Keris2112"
#property link "http://www.forex-tsd.com"

double ExtMapBuffer1[];
int init()
{
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_LINE);
switch(TimeFrame)
{
...
...
}
IndicatorShortName("MTF_RSI("+RSIperiod+") ("+TimeFrameStr+")");
}
return(0);
}
int start()
{
datetime TimeArray[];
int i,limit,y=0,counted_bars=IndicatorCounted();
limit=Bars-counted_bars;
for(i=0,y=0;i<limit;i++)
{
if (Time[i]<TimeArray[y]) y++;
ExtMapBuffer1[i]=iRSI(NULL,TimeFrame,RSIperiod,applied_price,y) ;
}
return(0);
}

And it works like this:


keris RSI

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...

 

should be: limit=Bars-counted_bars + TimeFrame/Period();

"programer" - you can't read or dum?

your "copyright" - right, you copied Kerises indi.., stick some minute changes (your 80% crap) : )))))

btw. it was very first post and Kerises very first mtf ind... Last edited by keris2112; 03-05-2006 at 02:11 AM. - whole thread after that

and btw - maryna, i'm not Keris

regards, fxxx

//+------------------------------------------------------------------+
//| MTF_RSI.mq4 |
//| Copyright © 2006, Keris2112 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Keris2112"
#property link "http://www.forex-tsd.com"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
#property indicator_level1 30
#property indicator_level2 70

extern int TimeFrame=0;
extern int RSIperiod=14;
extern int applied_price=0;

double ExtMapBuffer1[];
//+------------------------------------------------------------------+

int init()
{
SetIndexBuffer(0,ExtMapBuffer1);

TimeFrame=MathMax(TimeFrame,Period());
IndicatorShortName("MTF_RSI("+RSIperiod+") [M"+TimeFrame+"] ");

}

return(0);

//+------------------------------------------------------------------+

int start()
{
datetime TimeArray[];
int i,limit,y=0,counted_bars=IndicatorCounted();

if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;

ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);

limit=Bars-counted_bars + TimeFrame/Period();

for(i=0,y=0;i<limit;i++)
{
if (Time[i]<TimeArray[y]) y++;

ExtMapBuffer1[i]=iRSI(NULL,TimeFrame,RSIperiod,applied_price,y) ;

}

return(0);
}

 

I'm glad you posted this code. Now everyone can see that it is quite different...

 
marynarz15:

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 "i" with "A" and "y"with "B", TF/Per with "delta" (which is TF/Per) etc. would make it "quite different" - you just offending people intelligence - they not as dumb as you ... think

 

Thank you for sharing your opinion. I think you are much more intelligent than me :)