# Elite indicators :) - page 107

718

Linuxser:
MACD is an unbounded indicator and percent isn't present.

True. But if the higherst MACD peak in history is 0.002, the 25% line will be 0.0005. If there is a new high in MACD, say, 0.004, the 25% line will be changed to 0.001.

151973

...

swordfish,

Here you go.
A couple of lines of explanation : the deviation from your idea in this one is that the "zero line" is also calculated.

The idea is simple : in times of strong trends you are going to have the macd line over or under 0 for a long time which will make the meaning of 0 almost useless. This one calculates a new "zero line" which is a middle line of the highest and lowes value of the macd. All the rest is calculated than in respect to those 3 values

_________________________

Parameters :
FastLength -> fast macd length

SlowLength -> slow macd length

SignalLength -> macd signal length (it calculates it as EMA)

ApplyTo -> price to use in calculations

LookBackLength -> look back length for highs/lows

UpEarlyLevel -> the "early level" upper line

DownEarlyLevel -> the "early level" lower line

regards

swordfish:
True. But if the higherst MACD peak in history is 0.002, the 25% line will be 0.0005. If there is a new high in MACD, say, 0.004, the 25% line will be changed to 0.001.
Files:
macd_-_hl.gif 21 kb
macd_hl.mq4 4 kb
718

swordfish, Here you go.
A couple of lines of explanation : the deviation from your idea in this one is that the "zero line" is also calculated.

The idea is simple : in times of strong trends you are going to have the macd line over or under 0 for a long time which will make the meaning of 0 almost useless. This one calculates a new "zero line" which is a middle line of the highest and lowes value of the macd. All the rest is calculated than in respect to those 3 values

_________________________

Parameters :
FastLength -> fast macd length

SlowLength -> slow macd length

SignalLength -> macd signal length (it calculates it as EMA)

ApplyTo -> price to use in calculations

LookBackLength -> look back length for highs/lows

UpEarlyLevel -> the "early level" upper line

DownEarlyLevel -> the "early level" lower line

Thank you so much.

I don't understand why zero line needs to be recalculated. In a standard MACD histogram, the zero is fixed, isn't it?

151973

Swordfish,

In you calculations you omited periods when maximums for a given number of bars are bellow zero or minimums are above zero. In that case it is impossible to calculate the "early entry" lines the way you proposed (since you take a zero line as a "central line" and that center is in MACD "not honored" a lot of times.

Anyway, here you are a version with a fixed zero line. As you will see, maximums for a given period do not need to be positive, nor the minimums need to be negative

Here is a comparison of the 2 (lower is the "fixed zero line" version)
regards

swordfish:

Thank you so much.

I don't understand why zero line needs to be recalculated. In a standard MACD histogram, the zero is fixed, isn't it?
Files:
718

Swordfish,

Anyway, here you are a version with a fixed zero line. As you will see, maximums for a given period do not need to be positive, nor the minimums need to be negative

Here is a comparison of the 2 (lower is the "fixed zero line" version)

The zero line now matches the standard MACD zero. That is excellent. However, Hi and Lo lines are not really the historical highest high and the historical lowest low within the look back bars. The lines should be two flat lines. Even if they are historical highest and lowest, the 25% line may not provide me an early entry criteria, because 25% or even 5% may be a very high level due to a spike in history. Any suggestions? Perhaps a fixed level above and below zero? The question is how to select a fixed nubmer. Hope you understand my desire. I don't want to trade all the signals above zero especially when the trend is out of steam. I want to take the trades when MACD is freshly out of zero.

151973

swordfish,

"However, Hi and Lo lines are not really the historical highest high and the historical lowest low within the look back bars." They are (there is the code and you can see and check it for your self) "The lines should be two flat lines" Maybe you should use a large number for look back bars? Than you can get something like this :
As for the rest, I am sorry, but I fail to understand what do you mean

regards

swordfish:
The zero line now matches the standard MACD zero. That is excellent. However, Hi and Lo lines are not really the historical highest high and the historical lowest low within the look back bars. The lines should be two flat lines. Even if they are historical highest and lowest, the 25% line may not provide me an early entry criteria, because 25% or even 5% may be a very high level due to a spike in history. Any suggestions? Perhaps a fixed level above and below zero? The question is how to select a fixed nubmer. Hope you understand my desire. I don't want to trade all the signals above zero especially when the trend is out of steam. I want to take the trades when MACD is freshly out of zero.
Files:
5921

swordfish:
True. But if the higherst MACD peak in history is 0.002, the 25% line will be 0.0005. If there is a new high in MACD, say, 0.004, the 25% line will be changed to 0.001.

Ok. And then?

576

....

What don't you understand about Historical? The reason I sound so offensive right now is because you're wasting a valuable coders time.

Go look up the word historical, then ad some quantitive value to it. Historical can mean yesterday, or mean the year before, or right before you took a shit.

So before you go ahead complaining, or at least commenting on someone's grateful attempt to build your indicator. Why don't you make sure you >know< what you're talking about?

swordfish:
The zero line now matches the standard MACD zero. That is excellent. However, Hi and Lo lines are not really the historical highest high and the historical lowest low within the look back bars. The lines should be two flat lines. Even if they are historical highest and lowest, the 25% line may not provide me an early entry criteria, because 25% or even 5% may be a very high level due to a spike in history. Any suggestions? Perhaps a fixed level above and below zero? The question is how to select a fixed nubmer. Hope you understand my desire. I don't want to trade all the signals above zero especially when the trend is out of steam. I want to take the trades when MACD is freshly out of zero.
47

Ah, Bookkeeper. Pity he is not around any more

_______________________________

Anyway, patched alerts to it. If you set the allertsOnCurrentto true it will alert you on an opened (current) bar else it will alert you on a closed bar

regards

i also need a alert when candle close and X-ArrZZx2 show blue color

i have alert for green-red color but not blue wich will be take profit when blue appear.

Files:
706

Walander:
....

What don't you understand about Historical? The reason I sound so offensive right now is because you're wasting a valuable coders time.

Go look up the word historical, then ad some quantitive value to it. Historical can mean yesterday, or mean the year before, or right before you took a shit.

So before you go ahead complaining, or at least commenting on someone's grateful attempt to build your indicator. Why don't you make sure you >know< what you're talking about?

Exactly !