If Statements... setting two variables equal to each other;$10 PAYPAL FOR YOUR HELP

 

not sure how to write an if statement when I want to have two variables equal each other.


...


if(P = bid)

{

SendMail("MT4 Alert", "Price has reached Pivot Point");

}


P is a calculated value which works fine, Bid is the current bid price.


However this does not work giving me

'=' - illegal assignment used C:\Program Files\Interbank FX Trader 4\experts\indicators\Pivots_Daily EMAIL1.mq4 (391, 12)
'Bid' - unexpected token C:\Program Files\Interbank FX Trader 4\experts\indicators\Pivots_Daily EMAIL1.mq4 (391, 14)
')' - assignment expected C:\Program Files\Interbank FX Trader 4\experts\indicators\Pivots_Daily EMAIL1.mq4 (391, 17)


Thanks in advanced for your help.

 

trichman, comparing two values is done using '=='.


When '=' is used, you're telling the program to change the value of the variable to a new one.


So your code should look like this:


if(P == bid)

{

SendMail("MT4 Alert", "Price has reached Pivot Point");

}

 
wow its a programiing how i can start this i m also php mysql programmer can i know thais
 
yes boom ur right