Indicator one buffer for one line with 2 color
-
Hi , I need some clarification if possible: I seem to have understood, reading almost all the posts on the subject, that being able to make a condition work where the color change of the line generates a buy or sell signal depends on the number of indicator buffer. so if there is only one buffer you can't get the signal.
I noticed a couple of answers talking about the block indicator visible but I don't understand if even then it depends on the number of buffers or if there is a way to generate the signal. Thanks a lot for being available to anyone who replies. -
Is it an MT5 indicator? If so more than probably there will be one only buffer with all colours you need. Sadly, fxDreema cannot understand that. It need one separate buffer per colour.
-
Yes it is an MT5 indicator, HMA … it is how i understood… thanks very much for replay!
-
You're welcome.
-
@Rinaldoa70 In single buffer outputs, color changes are made by comparing x number of previous candles. Cadle Close1>Candle Close2 gets a rising color.
If we examine the code, for example:
{ if(ShowInColor && moving[shift-1] != EMPTY_VALUE) { trend[shift] = trend[shift-1]; if(moving[shift] > moving[shift-1]) trend[shift] = 1; if(moving[shift] < moving[shift-1]) trend[shift] = 2; } else trend[shift] = 0; }if (moving[shift] > moving[shift-1]) trend[shift] = 1;: If the moving value on the current bar is greater than the moving value on the previous bar, it assigns a value of 1 to the current shift index of the trend sequence. This represents an uptrend.
if (moving[shift] < moving[shift-1]) trend[shift] = 2;: If the moving value on the current bar is less than the moving value on the previous bar, it assigns a value of 2 to the current shift index of the trend sequence. This represents a downtrend.
-
Set the "Trace" box for the buffer you want to check. You can develop a condition based on the output data.
