TIME & SALES  [SOLVED]

Questions about MultiCharts and user contributed studies.
DTrader

TIME & SALES

Postby DTrader » 13 Dec 2011

Is there avy chance to have Time and sales on Multicharts DT?
I did a search and found the thread below.
However since MC DT does not allow to access at the Power Editor I can't insert the code and create this indicator

viewtopic.php?f=5&t=7842&p=35980&hilit= ... les#p35980

Code: Select all

// Original Code from https://www.TS.com/Discussions/Topic.aspx?Topic_ID=104700
// Solidus SDO time and sales
// Use on daily chart with Streaming Data Optimization enabled
// see input descriptions below


// Added or changed by SP for MC: TextLocation, Automatic Decimals, Block Alert as border, TextSize

//DefineDLLFunc: "GetMachineTime.dll", Float,"MachineTimeMillD";

input:
Rows ( 30 ), // max of 100
Show.Header ( false ), //added Jan 2011 by SP
Auto.Decimals ( true ), //added Jan 2011 by SP
Dec.Places ( 2 ), //decimal places for price data
Short.Price ( 0 ), //abbreviates price display, e.g., 25.25 instead of 2025.25
Volume.Threshold ( 20 ), //minimum volume to display
Show.Block ( true ), //added Jan 2011 by SP, draw a border on block levels
Alert.Threshold ( 50 ), //minimum volume to alert; must be larger than volume.threshold
//Alert.Divisor ( 100 ), // used to shorten alert sound; suggested value:100
Time.Setting ( 1 ), //time setting=2 to show full time; setting=1 to drop hours
Text.Size ( 8 ), //added Jan 2011 by SP
Up.Color ( green ), // color when trade is an uptick
Down.Color ( red ), //color when trade is a downtick
Heading.Color ( yellow ) , //color of heading at top
Block.Color ( White ); //added Jan 2011 by SP
var: Label.Text("-"), MyDecimalPlaces ( 0 ),
ii(0), hval(0), lval(0), diff(0), price(0), p.txt(" p"), vol.dat(0),
intrabarpersist updn.col(0), intrabarpersist prev.p(c), intrabarpersist prev.ticks(0),
intrabarpersist initialized(false), intrabarpersist last.tick(0), intrabarpersist this.bar(0),
intrabarpersist updn(0), t.val(0), Hr(0), One60th(1/60), Min(0), min2ts(0), sec(0),
time.string(" "), h.string(" "), m.string(" "), s.string(" "), rowz(rows+1);

array: Vol.txt[101](0), intrabarpersist Vol.str[101](" --- "), intrabarpersist vol.block [101](0), intrabarpersist Vol.col[101](getbackgroundcolor);

once begin
for ii=0 to rows begin
vol.txt[ii]=text_new_s(d,time_s,c,"text string");
text_setstyle( vol.txt[ii],1,0);
text_setcolor( vol.txt[ii],getbackgroundcolor);
end;
If Auto.Decimals = true then
begin
if PRICESCALE = 100000 then MyDecimalPlaces = 5
else
if PRICESCALE = 10000 then MyDecimalPlaces = 4
else
If PRICESCALE = 1000 then MyDecimalPlaces = 3
else
If PRICESCALE = 100 then MyDecimalPlaces = 2
else
If PRICESCALE = 32 then MyDecimalPlaces = 5
else
If PRICESCALE = 10 then MyDecimalPlaces = 1
else
If PRICESCALE = 8 then MyDecimalPlaces = 3
else
If PRICESCALE = 1 then MyDecimalPlaces = 0;
end;
If Auto.Decimals = false then MyDecimalPlaces = Dec.Places;

If Show.Header then begin
text_setstring(vol.txt[0],"T+S "+ symbolroot + " Trades>"+numtostr(Volume.Threshold,0) );
text_setcolor(vol.txt[0],heading.color);
text_setsize(vol.txt[0],text.size);
end;

end;

hval=GetAppInfo( aiHighestDispValue );
lval=GetAppInfo( ailowestdispvalue );
diff=(hval-lval)/rowz;
text_setlocation_s(vol.txt[0],d,time_s,hval);

if GetAppInfo(aiRealTimeCalc)=1 then
begin

if currentbar>this.bar then
begin //if new bar
this.bar=currentbar;
vol.dat=ticks;
end

else vol.dat=ticks - prev.ticks; // else old bar


if c>last.tick then updn.col=up.color else if c< last.tick then updn.col=down.color;

if initialized and vol.dat >= Volume.Threshold then
begin

//if vol.dat>=Alert.Threshold then alert(numtostr( intportion(vol.dat/Alert.Divisor),0) );

for ii = rows downto 1 begin
vol.str[ii]=vol.str[ii-1];
vol.col[ii]=vol.col[ii-1];
vol.block[ii] = vol.block[ii-1];
end;

if short.price>0 then price=fracportion(c/100)*100 else price=c;

p.txt=numtostr (price,MyDecimalPlaces); //price string
if intportion(price)<10 then p.txt="0"+p.txt;

vol.str[0]= numtostr (vol.dat,0); //volume string
if c>prev.p then vol.str[0]= vol.str[0]+" ++"+ p.txt+" "
else if c<prev.p then vol.str[0]= vol.str[0]+" --"+ p.txt+" "
else vol.str[0]= vol.str[0]+" "+ p.txt+" ";
vol.block[0] = vol.dat;

if Time.Setting>0 then
begin
t.val=fracportion(computerdatetime)*1440;

Hr = Mod(IntPortion( t.val * One60th ), 24 ) ;
Min = t.val - 60 * Hr ;
sec=intportion(fracportion(min)*60);

Min= intportion(min);
m.string=numtostr(min,0);
if min<10 then m.string="0"+m.string;

s.string=numtostr(sec,0);
if sec<10 then s.string=":0"+s.string else s.string=":"+s.string;

if hr>12 then hr=hr-12;
h.string=numtostr(Hr,0);
if hr<10 then h.string=" "+h.string;

if Time.Setting>1 then time.string= h.string+ ":"+m.string + s.string
else time.string=m.string + s.string;

vol.str[0]=vol.str[0]+ time.string;
end;

vol.col[0]=updn.col;

prev.p=c;

// set text strings, locations, color


for ii=1 to rows
begin
text_setsize (vol.txt[0],text.size);
text_setstring (vol.txt[ii]," "+vol.str[ii-1]+ " ") ;
text_setcolor (vol.txt[ii],vol.col[ii-1]);
Text_SetLocation_s (vol.txt[ii], d, intportion (MinutesToTime ((GetAppInfo (7))*60*24)*100) , hval-diff*(ii+1));
if Show.Block and vol.block[ii-1]>=Alert.Threshold then Text_Setborder(vol.txt[ii], true)
else Text_Setborder(vol.txt[ii], false) ;
end;

end;

prev.ticks=ticks; // set up for next tick
last.tick=c;
initialized=true;

end;

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: TIME & SALES

Postby Henry MultiСharts » 13 Dec 2011

We do not have plans to include this indicator into MCDT package at the moment.
Time and sales feature request has been confirmed.
So the Time and sales feature will be implemented in one of the future versions.

timokrates

Re: TIME & SALES  [SOLVED]

Postby timokrates » 19 Dec 2011

Hi,

can you say when app. will the T&S feature be available?
Also for me this is a must have.

Btw. you don't have to look too much into other platforms and develop, just take what you have in TS. This is perfect.

Apart from this I have to say that Multicharts DT is a very good way to get in touch with the powerful MT charting.

Thanks

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: TIME & SALES

Postby Henry MultiСharts » 19 Dec 2011

Unfortunately there is no estimated release time for this feature.
Please follow the Time and sales feature request for the further updates.


Return to “MultiCharts”