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

Re: Hashnums question



PureBytes Links

Trading Reference Links

> Back a bit I was interested in using Hashnums to transfer data between
> computers on a network, and got the demo to try it out.  I could not seem
> to make it work over the network, and since it would be slow to use files
> for the data transfer, found another solution.
>

Yes, both HashNums and Global Variables Professional can be used over a
network but you'll need to pass the data via a file rather than via RAM.
You'll also need to set up some handshaking lines to allow the two computers
to "talk" to each other similar to modem handshaking. Alternatively you can
have your workstation computer simply poll the file for new data. This is an
advanced topic and will require some programming expertise to accomplish but
it's very doable.

> Are any of you folks using Hashnums?  Does it transfer #'s between studies
> OK? Anyone used it simultaneously with TS and external programs, such as
> custom VB code? Anyone use it with multiple user DLL's (I use 2)?
>

We highly recommend HashNums and Global Variables Professional for all of
these tasks. They greatly expand the capabilities of TS.


> ----------------------
> inputs:         MY(1) ;
> vars:
>         t1(0), t2(0) , PutOK (0)
>         ;
> if CurrentBar = 1 then Begin
>

*** ERROR move this next line above the "if CurrentBar.." statement.

>   DefineDllFunc: "c:\TSadds\hashnums.dll" , INT,  "putAt", LPSTR, LPSTR,
> FLOAT;
> t1 = 1127 ;
> t2 = 1128 ;
>

snip...

> This gives a "Put error".  I've tried several variations and arrangements
> in the code, but so far, no 'put'.  I can write to the DLL OK using the
> Hashnums demo pgm, and I can "get" these values from another simple plot
> study.  It's just the "put" that does not seem to work.
>

Your code is very close to working, the error is that you need to place the
"DefineDLL.." statement outside the "IF CurrentBar.." statement as follows.
That will fix the problem.

inputs:         MY(1) ;
vars:
        t1(0), t2(0) , PutOK (0)
        ;
DefineDllFunc: "c:\TSadds\hashnums.dll" , INT,  "putAt", LPSTR, LPSTR,

if CurrentBar = 1 then Begin
FLOAT;
t1 = 1127 ;
t2 = 1128 ;
PutOK = putAt ("Global", "Wk1Hi" , 48  ) ;
IF  PutOK  = 1 then
      Begin
      End
Else
         print("Put Error", PutOK );

end;

Plot1( t1 , "MY1" );

--
--------------------- Doug Deming, IEC --------------------
Investment Engineering, Corp.-Omega Research "Solution Provider"
       * * * Visit our Investment Labs online! * * *
WWW Site: http://www.InvestLabs.com   PHONE: (808)875-4558
Email:     doug@xxxxxxxxxxxxxxxxxxx      FAX: (808)276-4557
-----------------------------------------------------------