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

Re: Easy Language Syntax



PureBytes Links

Trading Reference Links

> Date:          Fri, 08 May 1998 03:22:59 -0400
> From:          Michael Harris <eagleinc@xxxxxxxxx>

> I have a system that, when a certain condition is met, I want to buy as
> soon as that condition is met, provided the price at that moment is
> above the close of the previous bar.
> 
> What I am trying to say is somwthing like:
> Buy 100 shares {close of previous bar} stop.  Is the "close of the
> previous bar simply (close,1)? 

IF (condition AND high > close[1]) THEN
	buy at whatever.

You have to use high of that bar since unless you are using tick 
data, you can't know what the price is at that moment.  If you wish 
to wait to see that the price closes higher than the previous close, 
substitute close for high above.