[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Market Profile Code



PureBytes Links

Trading Reference Links

I found this Market Profile Code for TS4.
Can anyone make it work for ProSuite2000i ?

Re: Market Profile Code
                                       
   rich estrem (estrem@xxxxxxxxxxxxx)
   Fri, 4 Oct 1996 16:05:21 -0700 (MST)
   
     * Messages sorted by: [ date ][ thread ][ subject ][ author ]
     * Next message: William Vedder, Jr: "Re: Bullish Review-Commitment
       of Traders"
     * Previous message: Brian Dalby: "Block on LPT2"
     * Maybe in reply to: Orphelin@xxxxxxx: "Market Profile Code"
     * Next in thread: Orphelin@xxxxxxx: "Re: Market Profile Code"
       
   At 07:28 PM 10/3/96 -0400, you wrote:
   >Due to a serious amount of work on a certain fuzzy program, as well
   as
   >typewriting excess on the list,
   >I was not able to finish, document and send the Market Profile Code
   for
   >TradeStation that I promised 
   >to some of you. 
   >Even in France, days are 24 hours.
   >
   >But it will be done ASAP (Overlay profile too).
   >
   >Pierre Orphelin.
   >
   >
   Well, I happened to be playing with this same thing, so here is my
   hack
   code for MP (.. please cbot don't sue me). Please note all the setup
   requirements in the code comments for this to run - (TS4.0 only).
   I spent no time refining this - just got it to run and quit there.
   Its not pretty , but does work - hard coded for day US Tbonds opening
   at 720.
   Feel free to improve/modify. BTW - I have probably the original
   home-study course for MP, by jim dalton. If anyone wants to buy/trade
   for it, let me know by private email. Its been many years since I
   studied this method, so don't ask me for a dissertation on its
   theory,merits, etc!
   Pierre - what's an "overlay profile" ?
   
   -rich-
   
   estrem@xxxxxxxxxxxxx
   
   --------TS 4.0 code below--------------------
   {m***** profile style plot:
   put on a 1-tick chart of day session bonds, set for 1 day of data. set
   data
   style to invisible bars,
   set scaling to entire data series for both data & this indicator. set
   indicator
   properties to subgraph hidden, maxbarsback=0, update every tick.
   1st tick price row is red, all others are yellow, red trendline shows
   last
   tick.
   colors,etc. are harcoded but easily changed. best viewed on black
   background
   chart.
   note: plot is at FAR LEFT edge of chart, so scroll chart all the way
   to left
   and leave it there!
   bar spacing should be set to minimum.
   this code assumes trading starts on time, with no empty 1/2 hr bars.
   }
   
   {indicator: mpro4.0 (m***** profile style plot)
   put on a 1-tick chart of day session bonds, set for 1 day of data. set
   data
   style to invisible bars,
   set scaling to entire data series for both data & this indicator. set
   indicator
   properties to subgraph hidden, maxbarsback=0, update every tick.
   1st tick(open) price row is red, all others are yellow, red trendline
   shows
   last tick.
   colors,etc. are harcoded but easily changed. best viewed on black
   background
   chart.
   note: plot is at FAR LEFT edge of chart, so scroll chart all the way
   to left
   and leave it there!
   bar spacing should probably be set to minimum.
   }
   
   vars:lett("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),lcount(1),fp(0),xp(0),z(0),xp1
   (0) ;
   vars:hh(0),ll(0),x(96),count(0),y(100),minadd(30),et(0),st(720),
   clet("_A"),curtxt("");
   array:pri[200](0);
   
   if CurrentBar=1 then begin
   et=Addtime(st,minadd);
   fp=c; {first price, used to calc offset of later ticks in xp calc
   below}
   for y=1 to 200 begin {initialize all possible text ref locations}
   pri[y]= text_new(d,st+1,c-3+y points,".");
   TEXT_SETCOLOR(pri[y],7); {yellow}
   TEXT_SETSTYLE(pri[y],0,2);
   end;
   curtxt=text_getstring(pri[x]);
   text_setstring(pri[x],curtxt+clet);
   TEXT_SETCOLOR(pri[x],6); {make opening price red }
   hh=c;ll=c;
   end;
   xp1=xp;
   xp=intportion((3+c-fp+0.005)/0.03125) - 96;
   IF T >= ET then begin {a new time period just started}
   lcount=lcount+1; {letter count : 1=A,2=B,..}
   clet="_"+midstr(lett,lcount,1) ;
   et=addtime(et,minadd);
   hh=c;ll=c;
   curtxt=text_getstring(pri[x+xp]);
   text_setstring(pri[x+xp],curtxt+clet);
   end;
   
   if c > hh or c < ll then begin
   if c>hh then hh=c;
   if c st then begin {plot line to show last tick}
   z=z+1;
   if z=1 then begin
   value10=tl_new(d,st,c,d,t,c);
   tl_setcolor(value10,6);
   tl_setsize(value10,1);
   end else begin
   tl_setbegin(value10,d,st,c);
   tl_setend(value10,d,t,c);
   end;
   end;
   
   plot1(c,"dummy");
   
     * Next message: William Vedder, Jr: "Re: Bullish Review-Commitment
       of Traders"
     * Previous message: Brian Dalby: "Block on LPT2"
     * Maybe in reply to: Orphelin@xxxxxxx: "Market Profile Code"
     * Next in thread: Orphelin@xxxxxxx: "Re: Market Profile Code"



                    Re: Market Profile Code (addtime code)
                                       
   rich estrem (estrem@xxxxxxxxxxxxx)
   Sat, 5 Oct 1996 09:33:15 -0700 (MST)
   
     * Messages sorted by: [ date ][ thread ][ subject ][ author ]
     * Next message: John Buck: "Re: Tick Data Inc vs BMI tick data"
     * Previous message: Brian Dalby: "Tick Data Inc vs BMI tick data"
       
   Hi all-
   
   I guess the code I posted fri. for MP calls a user function,
   'addtime' which is not a built-in UF, although it does come
   from Omega. So, for those of you who don't have it already,
   and would like to run my code, here it is. Sorry for oversight,
   and thanks to Brian Dalby for letting me know.
   
   regards,
   rich
   estrem@xxxxxxxxxxxxx
   
   { User Function: AddTime
   Inputs : xTime - time in 24 hour format.
   Minutes - amount to add/subtract to xTime.
   
   Sample Usage :
   if (Time[0] > AddTime (Sess1StartTime, +30))
   then ...
   
   Returns: Adjusted time in 24 hour format.
   Properties
   [ ] Auto Detect
   [*] Simple
   [ ] Series
   
   Provided by Product Support Dept.
   of Omega Research, Inc.
   }
   
   Inputs : xTime (NumericSimple),
   Minutes (NumericSimple) ;
   
   AddTime = MinutesToTime (TimeToMinutes (xTime) + Minutes) ;
   
     * Next message: John Buck: "Re: Tick Data Inc vs BMI tick data"
     * Previous message: Brian Dalby: "Tick Data Inc vs BMI tick data"

 
 
 
 
Date of creation: 26-APR-1998 06:28:49.71