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

Re: An Easy Solution to BarsSinceEntry, EntryPrice, PREV, etc.



PureBytes Links

Trading Reference Links

could we do this in Excel?
Lionel Issen
lissen@xxxxxxxxxxxxxx
----- Original Message -----
From: "Dave Nadeau" <dave_nadeau@xxxxxxxxx>
To: "Metastock" <support@xxxxxxxxx>; "MetaStock Listserver"
<metastock@xxxxxxxxxxxxx>
Sent: Sunday, September 02, 2001 9:31 AM
Subject: An Easy Solution to BarsSinceEntry, EntryPrice, PREV, etc.


> This is an open message to anyone who has the Metastock Developers Kit
> and is competent in one of the programming languages it uses
> (PowerBasic, Delphi, C++).  I would do this myself, but I'm not
> competent in any of those languages...or rather, I'm not a programmer
> at all really...
>
> Through the Metastock Formula Language, there are functions which
> could provide the information to a .dll that would hold any value from
> the start of a trade:  Cum(1), ValueWhen(),BarsSince(), to name a few.
>
> If someone could program a .dll that could just store a variable as
> necessary, and hold that until it was reset, then all of the functions
> in the Subject of this message could be managed, as well as officially
> killing the justifiably maligned PREV function.
>
> All the .dll would have to do is to allow the passing of an input
> variable, and return the stored variable.  Or it could do this for
> multiple variables, if the input stream would allow.
>
> The Metastock code would then be written to pass a trigger and a value
> (say +1, ValueWhen(1,Signal=Long,Open+1)) to the .dll at a trade entry
> signal.  Any subsequent entry signals (+1,...) would not change the
> stored value in the .dll.  The .dll would have an internal flag that
> would be set when it initially stores a variable, and it would
> internally test everytime it receives a new signal of +1 (in this
> example) and would store a new value only when the flag is false.
>
> An exit signal would send a zero and the .dll would reset the stored
> value to either the closing price or zero (I can see arguments for
> both).  At this point the .dll would be ready to trigger and save a
> value again when it is passed a +1 or a -1 (for a short entry).
>
> As Roy has so impressively demonstrated, all of the other trading
> details and equity calculations could be handled in the Metastock
> code.  This would also open the door for calculating things like
> Maximum Adverse Excursion and Max Favorable Excursion, etc.
>
> If anyone could write this kind of a .dll, that would be a huge help
> to so many Metastock users.  And Equis, if anyone's monitoring here,
> this would be a simple add-in to your future products.  It wouldn't
> affect your source code of the System Tester and would add tremendous
> functionality.
>
> ================
> Dave Nadeau
> Fort Collins, CO
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>