Any ideas how to round the JPY pairs here?
If price is at 85, I'm trying to find how far it is away from a number in the array, eg 80 and 90, it should round up.
It works for the 5 decimal place pairs.
I am trying to round to tens so 80, 90, 100, 110 even if price is at 85
double RoundedValue;
RoundedValue=10*MathRound(Bid/10);
double RoundedValue;
RoundedValue=10*MathRound(Bid/10);
Thanks!
Any ideas on how I also include code to look for 2 decimal places in this?
I need to get the following code to also look at 0.25, 0.5, and 0.75 (ie 2 decimal places) in the range but not sure how to check that as well as checking the 1 st decimal place only.
For example, it should alert me at all main 1.x numbers (1.1, 1.2, 1.3, etc.) but also 1.25, 1.5, 1.75, 0.75, 0.5, 0.25
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Any ideas how to round the JPY pairs here?
If price is at 85, I'm trying to find how far it is away from a number in the array, eg 80 and 90, it should round up.
It works for the 5 decimal place pairs.
I am trying to round to tens so 80, 90, 100, 110 even if price is at 85