Hi,
i can not use this indicators because i have a little problem with the SmoothAlgotitms.
The problem is in the code ...
I get the error: "Can not be used for static array Allocated" at this point in the code:
/ / bPriceSeries (symbol, timeframe, int rates_total, applied_price, bar set, price_)
/ / + --------------------------------- +
{
/ / ----
uint bar;
double series [1];
------->!!! ArraySetAsSeries (series, true); !!!!<----------
can anyone help me with this problem???
Try this:
uint bar; double series []; <---- change ArraySetAsSeries (series, true);
A Quicker Trade Signal Using MACD
- The MACD and Signal line crossover gives traditional buy/sell signals.
- Histogram is the difference between the MACD and Signal line.
- We can enter when Histogram begins to get smaller rather than wait for a cross.
What Does the Histogram Represent?
The green histogram or “bar chart” included in the background of the MACD displays the difference between the MACD and Signal line. When the MACD is above the Signal line, the bar is positive. When the MACD is below the Signal line, the bar is negative. The actual height of the bar is the difference between the MACD and signal line itself.
MACD’s Histogram Construction
The chart above shows what the Histogram represents. The first label shows how the MACD is higher than the Signal line. This creates a positive green bar that has a height equal to the difference of the two lines. The second example the MACD is below the Signal line. This creates a negative green bar that has a height equal to the difference between the two lines. We can also see that when the Blue and Red lines cross, the histogram flips from one side to the other.
How to Enter Based On the Histogram
So how can we read the histogram to generate trade signals? We first want to track the histogram as it moves away from the zero line, in other words, track it as its bars grow larger. The actual signal comes when the histogram no longer gets larger and produces a smaller bar. Once the histogram prints a smaller bar, we look to trade in the direction of the histogram’s decline. We can see an example of this in the chart below:
MACD Histogram Entry Logic
The Sell signal on the left was created by four growing bars in a row followed by a fifth bar that closed smaller. Five bars later, we see the MACD line crossing below the Signal line which is a traditional MACD signal. This later signal would have missed a majority of the move that the Histogram signal would have caught. Therefore, using the histogram as a signal can earn us a greater number of pips.
The Buy signal on the right is a similar story. We saw four bars growing consecutively until a 5th bar was created that equaled the 4th. We want to wait until a bar is smaller, so the trigger would have been presented after the 6th bar closed. This buy trade came several bars before the MACD/Signal cross and gave us a better entry as well.
Once we are in the trade, we can use sound Money Management to close out the trade appropriately.
And The Rest is Histogram
This entry strategy is fairly straight forward and can quickly be adopted by a technical trader.
Hi
I can't run this indicator in MT5.
In editor when i compile,it shows 33 errors.In lines 537 to 550:
'colormacd_histogram.mq5' colormacd_histogram.mq5 1 1
'SmoothAlgorithms.mqh' SmoothAlgorithms.mqh 1 1
'Smooth_Method' - declaration without type SmoothAlgorithms.mqh 537 18
'Method' - comma expected SmoothAlgorithms.mqh 537 32
'Method' - undeclared identifier SmoothAlgorithms.mqh 540 11
'Method' - illegal switch expression type SmoothAlgorithms.mqh 540 11
'MODE_SMA_' - undeclared identifier SmoothAlgorithms.mqh 542 12
'MODE_SMA_' - constant expression is not integral SmoothAlgorithms.mqh 542 12
'MODE_EMA_' - undeclared identifier SmoothAlgorithms.mqh 543 12
'MODE_EMA_' - constant expression is not integral SmoothAlgorithms.mqh 543 12
'MODE_SMMA_' - undeclared identifier SmoothAlgorithms.mqh 544 12
'MODE_SMMA_' - constant expression is not integral SmoothAlgorithms.mqh 544 12
'MODE_LWMA_' - undeclared identifier SmoothAlgorithms.mqh 545 12
'MODE_LWMA_' - constant expression is not integral SmoothAlgorithms.mqh 545 12
'MODE_JJMA' - undeclared identifier SmoothAlgorithms.mqh 546 12
'MODE_JJMA' - constant expression is not integral SmoothAlgorithms.mqh 546 12
'MODE_JurX' - undeclared identifier SmoothAlgorithms.mqh 547 12
'MODE_JurX' - constant expression is not integral SmoothAlgorithms.mqh 547 12
'MODE_ParMA' - undeclared identifier SmoothAlgorithms.mqh 548 12
'MODE_ParMA' - constant expression is not integral SmoothAlgorithms.mqh 548 12
'MODE_T3' - undeclared identifier SmoothAlgorithms.mqh 549 12
'MODE_T3' - constant expression is not integral SmoothAlgorithms.mqh 549 12
'MODE_VIDYA' - undeclared identifier SmoothAlgorithms.mqh 550 12
'MODE_VIDYA' - constant expression is not integral SmoothAlgorithms.mqh 550 12
'MODE_AMA' - undeclared identifier SmoothAlgorithms.mqh 551 12
'MODE_AMA' - constant expression is not integral SmoothAlgorithms.mqh 551 12
'MODE_SMMA_' - case value already used SmoothAlgorithms.mqh 544 12
see previous usage SmoothAlgorithms.mqh 543 12
'MODE_LWMA_' - case value already used SmoothAlgorithms.mqh 545 12
see previous usage SmoothAlgorithms.mqh 544 12
'MODE_JJMA' - case value already used SmoothAlgorithms.mqh 546 12
see previous usage SmoothAlgorithms.mqh 545 12
'MODE_SMA_' - case value already used SmoothAlgorithms.mqh 542 12
see previous usage SmoothAlgorithms.mqh 546 12
'MODE_JurX' - case value already used SmoothAlgorithms.mqh 547 12
see previous usage SmoothAlgorithms.mqh 542 12
'MODE_AMA' - case value already used SmoothAlgorithms.mqh 551 12
see previous usage SmoothAlgorithms.mqh 547 12
'MODE_ParMA' - case value already used SmoothAlgorithms.mqh 548 12
see previous usage SmoothAlgorithms.mqh 551 12
'MODE_T3' - case value already used SmoothAlgorithms.mqh 549 12
see previous usage SmoothAlgorithms.mqh 548 12
'MODE_VIDYA' - case value already used SmoothAlgorithms.mqh 550 12
see previous usage SmoothAlgorithms.mqh 549 12
Please guide me solve this problem.
Thanks
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
MACD_Histogram:
The indicator displays divergences between a price chart and MACD histogram signal line.
The divergences are shown on a chart as line segments. The trade signals are displayed as colored arrows, also it shows alerts.
Author: Nikolay Kositsin