If Statements... setting two variables equal to each other;$10 PAYPAL FOR YOUR HELPBack to topics list |
|
tkrichman
2009.11.19 02:48
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) Thanks in advanced for your help. |
|
johnnyBoy
2009.11.19 13:05
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"); } |
|
boom007
2009.11.22 23:37
wow its a programiing how i can start this i m also php mysql programmer can i know thais
|
|
milky101
2009.11.23 00:09
yes boom ur right
|
