-
#property indicator_color1 clrAquamarine #property indicator_color2 clrAquamarine
Use two different colors, one up, one down. -
for(int i = Bars-2; i>=0; i--){
Why are you computing all bars every tick?
How to do your lookbacks correctly.
William Roeder:
I didn't understand the second part, I iterate over the Bars for checking if there is an engulfing candlestick pattern. I don't think the for
loop is the problem.
- Use two different colors, one up, one down.
- Why are you computing all bars every tick?
How to do your lookbacks correctly.
It's not the problem, it is just recomputing the same thing every tick, over and over. It's your electricity.
William Roeder:
It's not the problem, it is just recomputing the same thing every tick, over and over. It's your electricity.
Yeah, you are right, but my question is what i need to do to plot my engulfing bars, just anything else :)
It's not the problem, it is just recomputing the same thing every tick, over and over. It's your electricity.
Previously answered.
William Roeder:
Previously answered.
Sorry i don't understand, can you be more explicit about how i fix my code?
Previously answered.
Previously answered #1 № 1.
Instead of replying me with an answer that i didn't understand why you can not be more explicit? From the link that you sent to me i don't find the solution, I'm trying to understand how to proceed but it's not clear. Thank you
What part of "Use two different colors, one up, one down" is unclear? How can that be made "more explicit?"
William Roeder:
What part of "Use two different colors, one up, one down" is unclear? How can that be made "more explicit?"
What part of "Use two different colors, one up, one down" is unclear? How can that be made "more explicit?"
No the problem is not the color, The problem is that when I upload the indicator on the chart, there are not colored engulfing candles!
I already fixed the problem of the color, but this is not the reason of the problem.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Now i would like all the candles in my chart are colored if these conditions are satisfied, the code that I wrote is the following:
But it doesn't color anything. I'm new with the indicators so I'm trying to figure out how to program them. I'm using MT4, I also attach the complete file