How to Create a Forex EA part 3
1. Integers
Oh man, middle school third period math class flashback! If you paid close attention instead of secretly passing love notes to your cute seatmate then, you’d remember that an integer is just a fancy mathematical term for whole numbers. In other words, integers can be positive or negative numbers without decimals.In coding, integer values are denoted by “int” followed by its variable name and value like so:
2. Real numbers
“What do you mean REAL numbers? Does this mean there are fake numbers?” Well, you might be interested to know that there are IMAGINARY numbers, but that’s a different (boring!) topic altogether.Real numbers are basically those that have decimals or fractional parts such as 1.5, 0.7950, or 3.14159265359. This is denoted by “double” followed by its name and value:
3. Boolean values
Boo-what now? In case you haven’t encountered this term before, just remember that Boolean data types just indicate truth or falsehood. If your forex robot tells a lie, its nose will grow long like Pinocchio’s! Just kidding!Boolean values are denoted by “bool” and can take the following values: true, TRUE, 1 if they indicate a true statement or false, FALSE, 0 if they indicate a false statement. These are typically used in situations where prices or indicators need to meet certain conditions before a trade signal is given. Sounds really useful, huh?
Post a Comment