Pip tracker

 
if (Bid == Level+5 > Point){
   Alert(Symbol() + " is more than 5 points");
}

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?

 
thoughtful:

Can someone explain to me what am I doing wrong?

Can you explain what you intended this to do ?

if (Bid == Level+5 > Point)
 
thoughtful:

From a given price level, if the price moves 5 pips in my favor or against me, I want to be informed.

What are you defining as a Pip ? I define it as the last digit in even Digits pairs and the last but one digit on odd Digits pairs . . . so GBPUSD on a 5 digit Broker 1 pip = 10 points
 

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.

 
thoughtful:

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 ?

 
So you want an Alert when Bid is greater than level plus 5 points ? or to put it another way . . . Alert if ( Bid > Level + ( 5 * Point ) ) ?
 
Yes, thank you I appreciate it. I have to go now, but I am going to try that piece of code for the final touches in a few days, if I come across any problems, I'll respond to this post again. Take care.
 
thoughtful:

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.

 
jrmkr:

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