can i specify the format of price?

Questions about MultiCharts and user contributed studies.
User avatar
rokanten
Posts: 48
Joined: 29 Jul 2010
Location: south korea
Has thanked: 15 times

can i specify the format of price?

Postby rokanten » 09 Jul 2019

hi
got 2questions.

1.
i wonder if i can specify the form of price, and export it into csv file
for example, ZC(corn, cme) price format is like 333'4.
if i use script like
'fileappend(c:\zc.csv,numtostr(close,2));
then it prints 333.5, not 333'4
can i do this?

2.
is there function for round up or down for specific pricescale?
like floor and ceiling functions in excel.
if i use floor(333.4,0.25) then it gives back 333.25,
and ceiling(333.4,0.25) then it gives back 333.5.

thanks.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: can i specify the format of price?

Postby TJ » 09 Jul 2019

hi
got 2questions.

1.


2.
is there function for round up or down for specific pricescale?
like floor and ceiling functions in excel.
if i use floor(333.4,0.25) then it gives back 333.25,
and ceiling(333.4,0.25) then it gives back 333.5.

thanks.
In the Wiki,
See Contents,
Under -- 8 PowerLanguage Keyword Reference
Look for ► Math and Trig‎ (29 P)

Your requirement is very specific;
you have to write a function using the existing math keywords.


Return to “MultiCharts”