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

Re: Unidentified subject!



PureBytes Links

Trading Reference Links

> However, at the Easy Language seminar I attended I
> asked how I could program EL to assist me in putting
> on a trade for example, (opening price + .20) then,
> buy @ mkt.
> It was explained to me that EL is not capable of
> recognizing a data-point within a given bar.

You are describing a basic stop.  On bar X you issue a stop order to 
buy or sell at price Y.  On bar X+1 when price Y is hit -- intrabar --
 the order is executed as if it was a market order when the price was 
reached, like a perfect stop order with no slippage.

TS handles this with orders like "buy at Y stop".

> However one problem. There is still some bug in my code below such
> that the entry is made on the next bar at the price as the high of
> the original bar (for buys) and entry made on next bar at the same
> price as the low of the original bar (for sells). In other words,
> the code does not respect my desire for the entry to be made X
> points above the high of the original bar and Z points below the
> low of the original bar: 
> Inputs: etc.,etc.,X(2),Z(2);
> . . . then buy H[0] +X points stop;
> . . . then sell L[0] -Z points stop;

The problem is probably the "points" keyword.  That basically acts as 
a multiplier of "* ticksize".  If X is expressed in ticks, that's 
great.  If X is already expressed in full big points, you've got a 
problem.  So e.g. if this was SP and you wanted to buy one-half 
handle above the high, you'd say "buy High + 0.5 stop", ***NOT*** 
"buy High + 0.5 points stop".  

Gary