Adjust Spread Value
-
Hello friends, how can I do to adjust the spread value to a whole number?
I created this project but it doesn't display the value correctly.
The value is being displayed as 3.00
I want it to be displayed with just the number 3Reasons:
-
Get the entire value to create a condition for my EA not to open orders if the size of the Spread is above a value.
-
Activate the trailling stop with a calculation of Pips above the Spread value, for example:
Spread value (5) + a value that I determine (20) = 25, when the price is 25 pips away from where the trade was opened pull the stop loss to 15 pips.
-
-
Probably this will help:
-
@l-andorrà but in this case it will remain at 3.00 and not just number 3 alone without (.00)
Do you have any other solution?
-
Double datatype has decimal, while int only has whole numbers (integers).
Change your variable datatype to int

Note that there will now be rounding errors if you do any math with the variable. Maybe should create a dedicated int variable just for the comment display, and use double type variables elsewhere.