Questions about MultiCharts and user contributed studies.


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


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";

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);
 If Auto.Decimals = true then
    if PRICESCALE = 100000    then MyDecimalPlaces = 5
    if PRICESCALE = 10000    then MyDecimalPlaces = 4
   If PRICESCALE = 1000    then MyDecimalPlaces = 3
   If PRICESCALE = 100    then MyDecimalPlaces = 2
   If PRICESCALE = 32    then MyDecimalPlaces = 5
   If PRICESCALE = 10    then MyDecimalPlaces = 1
   If PRICESCALE = 8    then MyDecimalPlaces = 3
   If PRICESCALE = 1    then MyDecimalPlaces = 0;
   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) );

hval=GetAppInfo( aiHighestDispValue );
lval=GetAppInfo( ailowestdispvalue );

if GetAppInfo(aiRealTimeCalc)=1   then

    if currentbar>this.bar then
   begin //if new bar
   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
  //if vol.dat>=Alert.Threshold then alert(numtostr( intportion(vol.dat/Alert.Divisor),0) );

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

  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

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

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

      if sec<10 then s.string=":0"+s.string else s.string=":"+s.string;

      if hr>12 then hr=hr-12;
      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;   



// set text strings, locations, color

   for ii=1 to rows
         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) ;

prev.ticks=ticks; // set up for next tick


User avatar
Henry MultiСharts
Posts: 8383
Joined: 25 Aug 2011
Has thanked: 1200 times
Been thanked: 2679 times


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.



Postby timokrates » 19 Dec 2011


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.


User avatar
Henry MultiСharts
Posts: 8383
Joined: 25 Aug 2011
Has thanked: 1200 times
Been thanked: 2679 times


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”