chrisleonard
Junior member
- Messages
- 13
- Likes
- 0
I am making an indicator and im stuck on something small (i hope)
here is the code
variables:
Decimals( Log(PriceScale) / Log(10) ),
decimal(0),
ID(-1);
Value1 = XAverage( close, 200 ) ;
if decimals = 2 then decimal = 10;
if decimals = 3 then decimal = 100;
if decimals = 4 then decimal = 1000;
if decimals = 5 then decimal = 10000;
if Value1 > Value1[1] then begin
ID = Text_New(D,T,L-Range, "movement: " + numtostr(ATR,decimals) );
end;
the part coloured red needs to be multiplied by 1000 before its plotted but needs to be done with the number of decimals i have coded!
so ID = Text_New(D,T,L-Range, "movement: " + numtostr(ATR*10000,decimals) will not work it needs to be
ID = Text_New(D,T,L-Range, "movement: " + numtostr(ATR,decimals) *10000 somehow.
Any help much appriciated!
here is the code
variables:
Decimals( Log(PriceScale) / Log(10) ),
decimal(0),
ID(-1);
Value1 = XAverage( close, 200 ) ;
if decimals = 2 then decimal = 10;
if decimals = 3 then decimal = 100;
if decimals = 4 then decimal = 1000;
if decimals = 5 then decimal = 10000;
if Value1 > Value1[1] then begin
ID = Text_New(D,T,L-Range, "movement: " + numtostr(ATR,decimals) );
end;
the part coloured red needs to be multiplied by 1000 before its plotted but needs to be done with the number of decimals i have coded!
so ID = Text_New(D,T,L-Range, "movement: " + numtostr(ATR*10000,decimals) will not work it needs to be
ID = Text_New(D,T,L-Range, "movement: " + numtostr(ATR,decimals) *10000 somehow.
Any help much appriciated!