Converting 3 digit stocks into 4 digits by multiplying by 10

Hi All,
Is it possible to convert the 3 digits stocks to appear as 4 digits by multiplying by 10.
Say for Example OHLC is 123.10,126.40,121,122 respectively..
I want the candle to to appear like 1231,1264,1210,1220 by converting the live data feed..
Can anyone help me in this regard?
Thanks and regards.

This is just a wild guess but you cant convert live feed or datasource but in your formula you can change the default arrays themselves like

Close = Close * 10;

and the use those values to plot candle.

Specifically for 3 digit,

if( LastValue(C) > 99 AND LastValue(C) < 1000)
    // Then change default array
    C = Int(C * 10);       // and so on

1 Like


You may want to look at PlotOHLC Function.
( Plots the price chart using custom open, high, low, close arrays supplied as parameters)

With Regards

Sanjiv Bansal

@nsm51 - the advice is good BUT you have to do the same for ALL prices (Open, High, Low, Close). Candles require FOUR prices not one.
So the code should be amended to include OHLC.

// This does not write to the database, but only affect values in this particular formula
Open *= 10;
High *= 10;
Low *= 10;
Close *= 10;

Plot( C, "Price", colorDefault, styleCandle );
Plot( MA( C, 10 ), "Moving average", colorRed );

I used your code and modified it for all OHLC as Tomasz suggested.
Worked beautifully.
Thanks a Lot..

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.