I didn't find any previous post on the subject.
If there is any, please consider my apologies.
I've added the following numeric expressions to Market Scanner:
Code: Select all
//-----------------------------------------------------------------
Vars: NetChng(0), ChngPct(0), IndClose(0), Rou(3);
NetChng = (Close - Close[1]);
ChngPct = Round(100 * (Close - Close[1]) / Close[1], Rou);
IndClose = Round(100 * (Close / Avg(Close, 50)), Rou);
Plot1(Round(Open, Rou),"Open");
SetPlotColor( 1, white ) ;
Plot2(Round(High, Rou),"High");
SetPlotColor( 2, white ) ;
Plot3(Round(Low, Rou),"Low");
SetPlotColor( 3, white ) ;
IF Close > Close[1]
THEN BEGIN
SetPlotColor( 4, green );
SetPlotColor( 5, green );
SetPlotColor( 6, green );
END;
IF Close < Close[1]
THEN BEGIN
SetPlotColor( 4, red );
SetPlotColor( 5, red );
SetPlotColor( 6, red );
END;
IF Close = Close[1]
THEN BEGIN
SetPlotColor( 4, white );
SetPlotColor( 5, white );
SetPlotColor( 6, white );
END;
Plot4(Round(Close, Rou),"Close");
Plot5(Round(NetChng, Rou),"Net change");
Plot6(Round(ChngPct, Rou),"Chng %");
SetPlotColor( 7, white ) ;
Plot7(Round(Volume, Rou),"Volume");
IF IndClose > 100
THEN
SetPlotColor( 8, green ) ;
IF IndClose < 100
THEN
SetPlotColor( 8, red ) ;
IF IndClose = 100
THEN
SetPlotColor( 8, white ) ;
Plot8(Round(IndClose, Rou),"Indice Close");
// ---------------------------------------------------
The Market Scanner always show 5 decimal places.
What is wrong with this code ?
Many Thanks
Louis