I don't understand what you want!
In case you have e.g. 1.23456 do you want 1, or 1.23456 or 23456?
Your code converts the double 1.23456 to an integer so you get 1.
I don't understand what you want!
In case you have e.g. 1.23456 do you want 1, or 1.23456 or 23456?
Your code converts the double 1.23456 to an integer so you get 1.
the whole number which i keyin,
[ 1.12345 ] is what i want.
I don't understand what you want!
In case you have e.g. 1.23456 do you want 1, or 1.23456 or 23456?
Your code converts the double 1.23456 to an integer so you get 1.
StringToDouble
is what i need ?
If I understand your request: you have an edit box where you manually enter a price. You then want to use this price as an order TP?
If so, this should do what you ask:
// TakeProfitPoint = (int)StringToInteger(ObjectGetString(0,"ButtonEditTpPoint",OBJPROP_TEXT)); TakeProfitPoint = NormalizeDouble((double)ObjectGetString(0,"ButtonEditTpPoint",OBJPROP_TEXT),Digits));
Note: make sure that TakeProfitPoint is declared as a double.
If I understand your request: you have an edit box where you manually enter a price. You then want to use this price as an order TP?
If so, this should do what you ask:
Note: make sure that TakeProfitPoint is declared as a double.
thanks, done for this part.
i created edit box tp / sl for pips and for decimal price.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i am creating an one click trading
the question is .... how to get number with decimal place ?
for point, no decimal place => okay
for sl / tp target,
the result come out with decimal place, but can't get those decimal place for result.
let say i keyin 1.12345, result out with 1.00000
so, what should i add or i miss something there ?