Hello,
I have a script that does some calculation based on the price and outputs a line at a particular level.
It works great for instruments that use normal decimals. However, for instruments like bonds (ZB #F) that have a price of 119'01, for example, when I display the number it comes out as a decimal value. It draws the line at the correct level, but the display value is 119.03125. Is there a function I can call to convert this to 119'01, or do I have to do a conversion myself?
I believe the logic is every half tick is 0.015625 and every full tick is 0.03125, so some math could perform the conversion. But it would be nice if there was something already built-in.
Thanks!
Daniel
I have a script that does some calculation based on the price and outputs a line at a particular level.
It works great for instruments that use normal decimals. However, for instruments like bonds (ZB #F) that have a price of 119'01, for example, when I display the number it comes out as a decimal value. It draws the line at the correct level, but the display value is 119.03125. Is there a function I can call to convert this to 119'01, or do I have to do a conversion myself?
I believe the logic is every half tick is 0.015625 and every full tick is 0.03125, so some math could perform the conversion. But it would be nice if there was something already built-in.
Thanks!
Daniel
Comment