Need MC code snipit: Hide/Delete 1000/100 place in price  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
Sky
Posts: 53
Joined: Dec 05 2013
Has thanked: 21 times
Been thanked: 6 times

Jun 20 2024

Example: price is posting at 5126.25

I'm looking to display just the 10's, 1's and decimal place of the price; so just the "26.25".

Been thinking about how to get this done, but alas............... just smoke from the brain belt.

Just looking for a snipit of code to apply in my setup.
Thanks for any help and much appreciated.

OZ Trade
Posts: 47
Joined: Nov 08 2013
Has thanked: 11 times
Been thanked: 21 times

Jun 21 2024

Code: Select all

print(rightstr(numtostr(close,2),5));
Once you 'numtostr' you can extract with 'rightstr'

User avatar
TJ
Posts: 7774
Joined: Aug 29 2006
Location: Global Citizen
Has thanked: 1036 times
Been thanked: 2233 times

Jun 21 2024

Try this:

Code: Select all

FracPortion( Close/100 ) * 100 ;

User avatar
Sky
Posts: 53
Joined: Dec 05 2013
Has thanked: 21 times
Been thanked: 6 times

Jul 01 2024

OZ and TJ............thanks for the most eloquent snippet and solution. My brain was working on a long-winded solution, but lucky for me, I was patient.

TJ, happy to hear you're still on the rock. Stay strong and best of luck.