Compare()
<< Click to Display Table of Contents >> Compare() |
Compares two price values with respect to the Instrument TickSize to ensure accuracy when dealing with floating point math.
An int value.
A value of "1" is returned if price1 is greater than price2
A value of "-1" is returned if price1 is less than price2
A value of "0" if price1 is equal to price2
price1 |
A double value representing a price |
price2 |
A double value representing a price |
double newPrice = Close[0] + High[0] + Open[0]; |