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

DLL Code Example?



PureBytes Links

Trading Reference Links

<x-html><HTML>
I have run into the 64k barrier and need to program some of my routines
as a DLL which I can later call in functions, systems, indicators, etc.&nbsp;
I was wondering if anyone out here has had any experience programming DLL's
for TS or SC, and could send me some sample code which I could look at
and then model my own DLL's after.&nbsp; For example, suppose I wanted
to write a function which returned the average value, the logic would follow
like this:
<BR>
<HR WIDTH="100%">
<BR>Inputs: value(NumericSeries), len(NumericSimple) ;
<BR>Vars&nbsp; : sum(0), count(0) ;

<P>sum = 0;
<BR>FOR count = 0 to ( len - 1 ) BEGIN
<BR>&nbsp;&nbsp;&nbsp; sum = sum + value[count];
<BR>END;

<P>IF len > 0 then
<BR>&nbsp;&nbsp;&nbsp; Average = ( sum / len )
<BR>ELSE
<BR>&nbsp;&nbsp;&nbsp; Average = 0;
<BR>
<HR WIDTH="100%">
<BR>How would somebody actually code that routine into a DLL which I can
then call in TS or SC.&nbsp; Also, should there be multiple windows or
charts that this would be used in, how does TS and/or SC protect memory
addressing (i.e.: internal variable values) from being overwritten, or
how does it handle each instantiation of the routine?

<P>If anybody here can help me out, I would be most appreciative.&nbsp;
Please either E-Mail me directly at andrew@xxxxxxxxx (preferable) or post
to the list.&nbsp; Thanks in advance for your help.

<P>Andrew
<BR>andrew@xxxxxxxxx</HTML>
</x-html>From ???@??? Fri May 22 14:06:00 1998
X-POP3-Rcpt: neal@xxxxxxxxx
Return-Path: <owner-realtraders@xxxxxxxxxxxxxx>
Received: from accessone.com (list.listserver.com [198.68.191.15])
          by purebytes.com (8.8.4/8.8.4) with ESMTP
	  id NAA02284 for <neal@xxxxxxxxxxxxx>; Fri, 22 May 1998 13:03:39 -0700
Received: from localhost (localhost [127.0.0.1])
	by accessone.com (8.8.5/8.8.5/PIH) with SMTP id NAA29232;
	Fri, 22 May 1998 13:53:10 -0700 (PDT)
Received: from Richmond.NET (root@xxxxxxxxxxxxxxxxx [205.128.205.5])
	by accessone.com (8.8.5/8.8.5/PIH) with ESMTP id NAA28663
	for <realtraders@xxxxxxxxxxxxxx>; Fri, 22 May 1998 13:47:59 -0700 (PDT)
Received: from aspco.com (ppp44.richmond.net [205.128.205.44])
	by Richmond.NET (8.8.7/8.8.5) with ESMTP id QAA02365;
	Fri, 22 May 1998 16:47:40 -0400
Message-Id: <3565E47D.BE9C33E3@xxxxxxxxx>
Date: Fri, 22 May 1998 16:47:57 -0400
Reply-To: andrew@xxxxxxxxx
Sender: owner-realtraders@xxxxxxxxxxxxxx
From: Andrew <andrew@xxxxxxxxx>
To: RealTraders Discussion Group <realtraders@xxxxxxxxxxxxxx>
Subject: DLL Code Example?
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------32D638B30D0688FE78B2FDCE"
X-To: Omega List <omega-list@xxxxxxxxxx>,
        RealTraders Discussion Group <realtraders@xxxxxxxxxxxxxx>,
X-Mailer: Mozilla 4.04 [en] (WinNT; I)
X-Priority: 1 (Highest)
X-Listprocessor-Version: 8.1 -- ListProcessor(tm) by CREN

<x-html><HTML>
I have run into the 64k barrier and need to program some of my routines
as a DLL which I can later call in functions, systems, indicators, etc.&nbsp;
I was wondering if anyone out here has had any experience programming DLL's
for TS or SC, and could send me some sample code which I could look at
and then model my own DLL's after.&nbsp; For example, suppose I wanted
to write a function which returned the average value, the logic would follow
like this:
<BR>
<HR WIDTH="100%">
<BR>Inputs: value(NumericSeries), len(NumericSimple) ;
<BR>Vars&nbsp; : sum(0), count(0) ;

<P>sum = 0;
<BR>FOR count = 0 to ( len - 1 ) BEGIN
<BR>&nbsp;&nbsp;&nbsp; sum = sum + value[count];
<BR>END;

<P>IF len > 0 then
<BR>&nbsp;&nbsp;&nbsp; Average = ( sum / len )
<BR>ELSE
<BR>&nbsp;&nbsp;&nbsp; Average = 0;
<BR>
<HR WIDTH="100%">
<BR>How would somebody actually code that routine into a DLL which I can
then call in TS or SC.&nbsp; Also, should there be multiple windows or
charts that this would be used in, how does TS and/or SC protect memory
addressing (i.e.: internal variable values) from being overwritten, or
how does it handle each instantiation of the routine?

<P>If anybody here can help me out, I would be most appreciative.&nbsp;
Please either E-Mail me directly at andrew@xxxxxxxxx (preferable) or post
to the list.&nbsp; Thanks in advance for your help.

<P>Andrew
<BR>andrew@xxxxxxxxx</HTML>
</x-html>From ???@??? Fri May 22 17:43:29 1998
X-POP3-Rcpt: neal@xxxxxxxxx
Return-Path: <owner-realtraders@xxxxxxxxxxxxxx>
Received: from accessone.com (list.listserver.com [198.68.191.15])
          by purebytes.com (8.8.4/8.8.4) with ESMTP
	  id QAA04275 for <neal@xxxxxxxxxxxxx>; Fri, 22 May 1998 16:45:54 -0700
Received: from localhost (localhost [127.0.0.1])
	by accessone.com (8.8.5/8.8.5/PIH) with SMTP id RAA11948;
	Fri, 22 May 1998 17:33:58 -0700 (PDT)
Received: from camel8.mindspring.com (camel8.mindspring.com [207.69.200.58])
	by accessone.com (8.8.5/8.8.5/PIH) with ESMTP id RAA11580
	for <realtraders@xxxxxxxxxxxxxx>; Fri, 22 May 1998 17:29:52 -0700 (PDT)
Received: from default (pool-207-205-142-219.rvdl.grid.net [207.205.142.219])
	by camel8.mindspring.com (8.8.5/8.8.5) with SMTP id UAA12212;
	Fri, 22 May 1998 20:29:49 -0400 (EDT)
Message-Id: <3.0.1.32.19980522192828.00a2dcd4@xxxxxxxxxxxxxxxxxx>
Date: Fri, 22 May 1998 19:28:28 -0500
Reply-To: petena9090@xxxxxxxxxxxxxx
Sender: owner-realtraders@xxxxxxxxxxxxxx
From: Peter Namtvedt <petena9090@xxxxxxxxxxxxxx>
To: RealTraders Discussion Group <realtraders@xxxxxxxxxxxxxx>
Subject: Re: DLL Code Example?
In-Reply-To: <3565E47D.BE9C33E3@xxxxxxxxx>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-To: andrew@xxxxxxxxx,
        RealTraders Discussion Group <realtraders@xxxxxxxxxxxxxx>
X-Sender: petena9090@xxxxxxxxxxxxxxxxxx
X-Mailer: Windows Eudora Light Version 3.0.1 (32)
X-Listprocessor-Version: 8.1 -- ListProcessor(tm) by CREN

At 04:47 PM 5/22/98 -0400, Andrew wrote:
>   For example, suppose I wanted to write a function which returned the
>average value, the logic would follow like this: 
>  
>Inputs: value(NumericSeries), len(NumericSimple) ; 
>  : sum(0), count(0) ;  sum = 0; 
>FOR count = 0 to ( len - 1 ) BEGIN 
>    sum = sum + value[count]; 
>END;  IF len > 0 then 
>    Average = ( sum / len ) 
>ELSE 
>    Average = 0; 
>  
>  Also, should there be multiple windows or charts that this would be used
>in, how does TS and/or SC protect memory addressing (i.e.: internal
>variable values) from being overwritten, or how does it handle each
>instantiation of the routine?     Thanks in advance for your help.  Andrew 
>andrew@xxxxxxxxx 

Andrew and all:

This DLL coding rule and the 64K limit is an Intel plot.  Why do we all,
like polite little sheep, put up with this part of the old 8080 computer
architecture?  Why should a computer holding 64 met or more of programs
sort of "resident" in RAM have to swap or page parts of that software into
the tiny 64K native RAM to get our larger computing jobs done?  

The machine that has this limitation restricts us.  So anything that needs
frequent attention or continuous monitoring has to be allocated a permanent
part of that 64K needs more of the Mircosoft operating system and more work
behind the scenes, picking
lint out of its navel instead of directly doing our work!

Apple Computer may yet gain a big niche in this world.  Or Sun or Silicon 
Graphics.

I don't have the answer, but if the 64K limit and DLL's are the answer, what
the hell was the question???

PeteNa9090
petena9090@xxxxxxxxxxxxxx