Why do you thing that b2_shift1 or b2_shift2 will ever be 1? It will (in 99.9999999999999999999% of cases) not
Check your conditions and what exactly you are comparing
Dear Mladen,
My problem is with this parameter
I have used everything I remember but no signal
if(b1_shift1!=1 && b2_shift1==1) { Alert("buy signal"); Print("buy signal");
Dear Mladen,
My problem is with this parameter
I have used everything I remember but no
signal
Please read my previous answer to you
I read your text, dear friend
I
want to compare color # 0 with color # 1
And whenever the color values in the first and second candles are ignored, a
warning is issued
But I can't believe the values
I just tried
numbers # 1 but I know that's not right
I read your text, dear friend
I want to compare color # 0 with color # 1
And whenever the color values in the first and second candles are ignored, a warning is issued
But I can't believe the values
I just tried numbers # 1 but I know that's not right
Where in the data window you ever saw value 1?
I shall repeat : check your conditions since none of those values will ever be 1. I rest my case now
if(Volume[0]<=1) { if(b1_shift1!=1 && b2_shift1==1)
-
For a new bar test, Bars is
unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable
(duplicate prices and
The == operand. - MQL4 programming forum.)
Always use
time.
I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
New candle - MQL4 programming forum - Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum
- For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is
unreliable (miss ticks,) Price is unreliable (duplicate prices and
The == operand. - MQL4 programming forum.) Always use time.
I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
New candle - MQL4 programming forum - Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum
I have this function
if(b1_shift1!=1 && b2_shift1==1)
I used this function instead
if (MathAbs(b1_shift1 - b2_shift1) < Point / 2)
But the wrong signals give too
much attention to the photo
Am I wrong again?
I have this function
I used this function instead
But the wrong signals give too much attention to the photo
Am I wrong
again?
Given that buffers 0 and 1 should be a histogram, to identify color change, you can just do this:
if (b1_shift1>b2_shift1 && b1_shift2<b2_shift2) // Sell; if (b1_shift1<b2_shift1 && b1_shift2>b2_shift2) // Buy;PS. Earlier comments on comparing doubles are all valid, and your attempt to compare them in post #7 is correct. But to achieve your objective, you need not deal with their equality...
Given that buffers 0 and 1 should be a histogram, to identify color change, you can just do this:
PS. Earlier comments on comparing doubles are all valid, and your attempt to compare them in post #7 is correct. But to achieve your objective, you need not deal with their equality...Hi dear friend
I realized
my mistake
I should have compared the colors, not the candles
Thank
you dear friend.
(Your cod is working Good)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
And the expert does not emit any signal
I asked the programmers for guidance on this
Thanks everyone