email alert -- Decimal rounding
email alert -- Decimal rounding
I created a indicator that sends a email alert saying when to enter and the suggested stop value is the parabolic SAR value but for some reason in the email it will only show to the second decimal place, this works fine for s&p's but not for the currencies, any suggestions ?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Decimal rounding
Try using the reserved word NumToStr(variable, number of decimals), for example:
..would give
Code: Select all
Print("Price of eur/usd: ", NumToStr(Close, 4));
Print("Total volume: ", NumToStr(Volume, 0));
Price of eur/usd: 1.3064
Total volume: 24204
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: email alert -- Decimal rounding
he's asking about email alert.
try this:
try this:
Code: Select all
Alert( "Price of eur/usd="+ text(Close:1:4) );
Re: email alert -- Decimal rounding
thanks guys, I used a somewhat of a blend of the above,
if condition1 then alert (Text( "Bullish Entry Signal use following as stop value", NumToStr(value2,6)));
if condition1 then alert (Text( "Bullish Entry Signal use following as stop value", NumToStr(value2,6)));