PureBytes Links
Trading Reference Links
|
I guess it depends on how specific this exit is for you. If you write
it as a separate signal, you can use it in other strategies, now and
in your future coding; if you intend it for this approach exclusively,
then you might find it easier to edit the code all in one place. It's
really a matter of personal preference.
--Dave
> -----Original Message-----
> From: cash@xxxxxxxxxxx [mailto:cash@xxxxxxxxxxx]
> Sent: Sunday, August 12, 2001 2:42 PM
> To: dave@xxxxxxxxxxx
> Cc: omega-list@xxxxxxxxxx
> Subject: RE: Setting stops in TS2K?
>
>
> Dave,
>
> Thanks for the suggestion. I'll play with it and see if it
> fits in with
> what I'm doing.
>
> In your opinion, is it better to work this in with my main
> signal or
> should I keep it as a separate signal and have it as one of the
> signals in my strategy?
>
> Thx,
>
> Cash
>
>
> Send reply to: <dave@xxxxxxxxxxx>
> From: "Dave Nadeau" <dave_nadeau@xxxxxxxxx>
> To: "Omega List" <omega-list@xxxxxxxxxx>,
> <cash@xxxxxxxxxxx>
> Subject: RE: Setting stops in TS2K?
> Date sent: Sun, 12 Aug 2001 11:12:44 -0400
>
> > Cash,
> >
> > You can write the whole thing in your EasyLanguage code,
> and at the
> > end just build a strategy using the Entries and Exits
> from that code.
> > That way you can keep your variables working. Write this
> as part of
> > your current signal or as a separate one that you add in when you
> > build the strategy:
> >
> >
> > > For example, I want to set my trailing stop based on a
> few things:
> > > Once I'm in a position, I want to initially set my trailing
> > > stop = (10%
> > > of the 20 day average true range) + .25.
> > > Then, for every .25 profit, I want to increment my
> trailing stop by
> > > .05.
> >
> >
> > {Cash's Variable Stop ****************
> >
> > created 8/12/2001***************}
> >
> > Vars: Incr(0),StartPoint(Close);
> >
> > Incr=IntPortion(OpenPositionProfit*4);
> > StartPoint=0.10*AvgTrueRange(20)+0.25;
> >
> > {Long Stop}
> > If MarketPosition > 0 AND Close < Close[1]-(StartPoint +
> 0.05*Incr)
> > then ExitLong at Close;
> >
> > {Short Stop}
> > If MarketPosition < 0 AND Close > Close[1]+(StartPoint +
> 0.05*Incr)
> > then ExitShort at Close;
> >
> > SetExitOnClose;
> >
> > {***************************************}
> >
> > Do check the logic on this; I'm not sure from where you want your
> > trailing stop to operate--I've assumed the prior bar's
> close. Also
> > you said the ATR for 20 days--I assumed you meant bars.
> Anyway, this
> > should give you the gist of how to set it up.
> >
> > ================
> > Dave Nadeau
> > Fort Collins, CO
> >
> >
> >
> >
> >
> >
> > > So what I have is an initial stop and then as the
> position builds
> > > profit, I want to give it more room to breathe.
> > > Then I want to check on the last bar of the day if I'm
> still in the
> > > position, I won't use the stop, I'll just exit at the close.
> > >
> > > The thing I can't figure out is that if I use the signals
> > > in the strategy
> > > builder, how do I keep adjusting the stop based on my current
> > > position's profit? The only way I can see doing this is by
> > > incorporating it in my main signal. Either that, or I
> don't have a
> > > good grasp on the strategy builder.
> > >
> > > OK, now just a stream of conciousnous thought.
> > > I build a signal called EnterPosition which eventually
> gets me in a
> > > position
> > > I also build a signal called set trailing stop. This
> > > signal looks at my
> > > current position, the 20 day ATR, the entry price of my current
> > > position, and the profit of my current position. It then
> > > enters a stop
> > > for the appropriate amount.
> > >
> > > Cash
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
>
>
>
> "Buy Low, Sell High"
> (If this statment is used for financial gain, I am entitled
> to 10% of all profits. ;) )
>
|