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

Re: [Metastockusers] Re: Trade Station/instead of Meta Stock?



PureBytes Links

Trading Reference Links

Okay, as an example of the complexity in coding an exit in MetaStock
Language, here's a simple channel breakout entry that uses Chuck
LeBeau's Chandelier Exit.  The equivalent EasyLanguage code for a
Chandelier Exit is about three simple lines of code.


LONG ENTRY
-----------------
UpperChannel:= Ref(HHV(HIGH, opt1), -1);
LowerChannel:= Ref(LLV(LOW, opt1), -1);
CLOSE > UpperChannel


LONG EXIT
--------------
UpperChannel:= Ref(HHV(HIGH, opt1), -1);
LowerChannel:= Ref(LLV(LOW, opt1), -1);
MoneyMgmtStop:= opt2;

{DEFINE ENTRY PRICE, WITH EXIT BEING -ENTRY PRICE AND NO TRADE BEING 0}
EntryPrice:= If(PREV <= 0,
   {Trade entered today?}
   If(CLOSE > UpperChannel, CLOSE, 0),
      {Trade entered before today. Stopped today?}
      If(LOW <= PREV - MoneyMgmtStop, -PREV,
      If(LOW <= HighestSince(1,PREV=0,HIGH) - 3 * ATR(10), -PREV,
      If(LOW <= HighestSince(1,PREV=0,CLOSE) - 2.5 * ATR(10), -PREV,
PREV))));

{EXIT IF ENTRY PRICE < 0 (MEANING EXIT)}
EntryPrice < 0



----- Original Message -----
From: "Roy Larsen" <rlarsen@xxxxxxxxxxxxxx>
To: <metastockusers@xxxxxxxxxxxxxxx>
Sent: Monday, April 21, 2003 12:05 PM
Subject: Re: [Metastockusers] Re: Trade Station/instead of Meta Stock?

> Glen
>
> > Have you ever tried to write an exit in MetaStock language that
> > refers to the entry price?
>
> I do it all the time. It's not that big a deal. An accurate exit that
> includes provision for a stoploss and profit target as well as an "entry
> independent" exit can be done with as few as two PREV functions. Three
> PREV's are better but not essential if the exit stops are based solely on
> CLOSE.
>
> Roy
>
> > I'm a devoted MetaStock user, but EasyLanguage is the superior
> > language for coding systems and indicators, despite its complexity.
> >
> >
> >
> > ----- Original Message -----
> > From: "Henry Z Kaczmarczyk" <henry1224@xxxxxxxxx>
> > To: <DEFANGED_metastockusers@xxxxxxxxxxxxxxx>
> > Sent: Sunday, April 20, 2003 3:53 PM
> > Subject: [Metastockusers] Re: Trade Station/instead of Meta Stock?
> >
> > > Have you ever tried to write a formula in easy language? You can
> > > only plot 4 lines in an indicator. you have a certain limit of
> > > indicators in tradestation. Metastock is faster than TS, you can
> > > only do 1 stock per system test at a time. it costs more for TS
> > >
> > >
> > >
> > > --- In Metastockusers@xxxxxxxxxxxxxxx, "keithsipos2003"
> > > <keithsipos@xxxx> wrote:
> > > > Trade station, seems to have all the tools Meta stock does, with
> > > > simpler means to arriving at the same ends.  Is this a company
> > > > that works as well as Meta Stock/or does metastock have the
> > > > edge?

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/i5gGAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/