[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 3

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Show all code
The thing is, if you remove the MA-comparison, it works!
If you plug it back in, it does NOT work at all!
MA_1 and MA_2 must be of type double.
What's your type?
"But I've always been the queen of hearts" (c) "12 Chairs"
and I've always put them in int
Yes, as you were told above, if the variables are of the int type they will give 1 for the euras, because converting1.3075 to the int type gives 1, and you are probably printing your variables and not the average values.
gbkznm.... what a shame!!! exactly! int is a WHOLE number and double is a floating point....
shame!
and I've always stuck them in the int
EVERYTHING SEEMS TO BE WORKING!!!
THANK YOU SO MUCH!!!
Thought it was over.... :))))))
Knowledge - FULL trousers! :)))
I repent......
"But I've always been the queen of hearts" (c) "12 Chairs"
and I've always had them in the int
Variables of int type are integers, and when you set them to a number with a fractional part, the number is rounded to the nearest whole number first, and then the value of that number is set to an int variable.
Teach me, for Christ's sake, how to work with comments:
1. if a comment is already made, or is being made, how can I not paste it, but go on to make another comment, if, for example, the question has already been answered?
2. if a code is inserted, how do I go on to insert plain text after inserting it? Enter continues entering text as code.
3. when copying, some things it inserts by default, e.g. when copying from help, the copied is inserted as a link.How do I paste the copied as plain text?
If you put a double variable into an int, I know what will happen. But what if you do the reverse operation? int todouble won't make it worse, will it?