EA generator
You can use it with an EA like any other indicator. Its buffer #0 holds the values for uptrend, its buffer #1 holds values for downtrend. You have something wrong in the Strategy Tester if it doesn't show its backtester properly.How to use with an EA? The indicator work's fine with current graph, but when visually testing it's plot only one color. I tried to create another buffer to get the trend value too but no success. Any help? Thanks.
You can use it with an EA like any other indicator. Its buffer #0 holds the values for uptrend, its buffer #1 holds values for downtrend. You have something wrong in the Strategy Tester if it doesn't show its backtester properly.
SetIndexBuffer(0, Buffer, INDICATOR_DATA); SetIndexBuffer(1, Color, INDICATOR_COLOR_INDEX);
Sorry, I didn't realize you were asking about the version for MT5.Hi @Enivid , thanks for your attention.
From the code, buffer #1 holds values for the color, or I missing something?
MQL5:SetIndexBuffer(0, Buffer, INDICATOR_DATA); SetIndexBuffer(1, Color, INDICATOR_COLOR_INDEX);
How I can know the direction for the current trend? Basically for each closed candle, I want to check the previous candle trend. For example, with an open position, I want to exit the trade when the trend changes.
About the Strategy Tester, is there a recommended settings? When the test begin I can see the history plot the colors just fine, but the ongoing test show only one color, but the prices buffer is correctly.
I'm trying to get buffer #1 values from previous candles, but the result is always 0. Maybe it's related with Strategy Tester in real-time too?Sorry, I didn't realize you were asking about the version for MT5.
In MT5, you can use buffer #1, which holds the color index: 0 - up, 1 - down.
There is a bug with the current candle color calculation that causes Strategy Tester and real-time color stay the same. I will try to fix it as soon as possible.
Thanks @Enivid, really appreciate your help.Version 1.01 released to address the issue with unchanging color in MT5.