Can someone explain to me what am I doing wrong?
Can you explain what you intended this to do ?
if (Bid == Level+5 > Point)
From a given price level, if the price moves 5 pips in my favor or against me, I want to be informed.
Thank you for your quick response. I am trying to find a way to track the movements of points, I thought it would be as simple as keep track of points but I see that is not the case. But I can modify codes if I learn how to code it right.
if (Bid == Level + 5 > Point)
What I am trying to do here is, if if the price moves from a level, example...
extern double Level = 1.23456
And I change that level to 1.02718 as it is the quote for AUD/USD right now. But a change in 5+ or 5- points, I want to be informed. I tried it with switch statement and NormalizeDoube, but that wasn't so convenient.
Again thank you for your quick response, for any further clarification just ask away.
Thank you for your quick response. I am trying to find a way to track the movements of points, I thought it would be as simple as keep track of points but I see that is not the case. But I can modify codes if I learn how to code it right.
What I am trying to do here is, if if the price moves from a level, example...
And I change that level to 1.02718 as it is the quote for AUD/USD right now. But a change in 5+ or 5- points, I want to be informed. I tried it with switch statement and NormalizeDoube, but that wasn't so convenient.
Again thank you for your quick response, for any further clarification just ask away.
I think I understand what you are trying to do in general, I was looking for you to explain that specific line of code. To figure out what happens with that line of code you need to look at the Precedence Rules . . .
I think this is how it will work . . .
First: Level + 5
Second: == and > have the same priority, if we work from the left your code would read . . .
if ( ( Bid == Level + 5 ) > Point)
so you will be comparing a bool ( Bid == Level + 5 ) with Point . . . . I'm pretty sure this isn't what you intended ?
Thank you for your quick response. I am trying to find a way to track the movements of points, I thought it would be as simple as keep track of points but I see that is not the case. But I can modify codes if I learn how to code it right.
What I am trying to do here is, if if the price moves from a level, example...
And I change that level to 1.02718 as it is the quote for AUD/USD right now. But a change in 5+ or 5- points, I want to be informed. I tried it with switch statement and NormalizeDoube, but that wasn't so convenient.
Again thank you for your quick response, for any further clarification just ask away.
I think sequence has no argument in a right way that you expected.
Try adding this.
if(Bid == Level + (5 * (point/10)))
Note: However it doesn't need brackets for point/10. bcoz "*" and "/" allowed mixed calculations. I indicate it for clear.
I think sequence has no argument in a right way that you expected.
Try adding this.
if(Bid == Level + (5 * (point/10)))
Note: However it doesn't need brackets for point/10. bcoz "*" and "/" allowed mixed calculations. I indicate it for clear.
Perhaps you meant . . .
Point * 10
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can someone help me with this? By looking at it, I'm sure you get the gist on what I am trying to do. From a given price level, if the price moves 5 pips in my favor or against me, I want to be informed. I also want to be informed by alert if the price reaches +10 or -10, and + or - 15, and 20 and etc. But I can't seem to built this for the life of me. I am lost when it comes to placing something in front of the point. Does it matter what comes in front of the point?
Can someone explain to me what am I doing wrong?