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

RE: Exit Question


  • To: "'Mike Gossland'" <mga@xxxxxxxx>
  • Subject: RE: Exit Question
  • From: "Vince Batla" <vbatla@xxxxxxxxxxxxxxxxxx>
  • Date: Wed, 4 Dec 2002 14:10:39 -0800
  • In-reply-to: <5.1.0.14.2.20021204130207.028a8ec0@xxxxxxxx>

PureBytes Links

Trading Reference Links

We're real close.  How would I assign the high price of the bar
preceding the entry bar to a variable?  

Thanks,

Vince

-----Original Message-----
From: Mike Gossland [mailto:mga@xxxxxxxx] 
Sent: Wednesday, December 04, 2002 3:06 PM
To: Vince Batla
Subject: RE: Exit Question


At 11:47 AM 12/04/2002, you wrote:
>Thanks for responding.  What I'm trying to code is an exit at the low 
>or high of the bar preceding the entry bar.  EX:  I enter a trade at 
>the Low of Low[1], if the trade goes against me I want to exit at the 
>High of High[1] even if the trade is several days into the trade.  
>Which would be exitshort at h[7]stop;  I need a way to reference a 
>specific bar.
>
>Thanks,
>
>Vince

While you *can* reference back a growing number of bars, I think it's
easier to remember the stop price right at the beginning.

Just save the h[1] value in a variable like so:

var: hi_stop(0);

{Before putting on the trade, remember the stop level}

hi_stop = h[1];
Buy at ...;

{Keep working this order on every bar}
ExitLong at hi_stop stop;

---

That ought to give you some ideas on how to do it.

Regards,

Mike Gossland


___________________________

Mike Gossland
info@xxxxxxxxxxxx
www.gossland.com
Tel: (250) 756-3970
Fax: (250) 756-3978