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

Re:EL help needed.



PureBytes Links

Trading Reference Links

You must name the Entry Signal and then use At$ to call the entry bar. and then
you can reference the bar prior to the entry bar or the entry bar. You must also
name the exit signal.

Example

Input: LongLim(.25),StopLoss(.0625);

If Conditions 
 then Buy ( "MyBuy") High  + LongLim stop;

ExitLong ("StopLossLong") from entry ("MyBuy") At$ Low[1] - stoploss stop;


This is an exit .0625 below the Low of the Bar Before the EntryBar. Using Low
would be the Low of the entry bar. If you said At$ + 2 points you would exit
with a 2 point profit target.

Hope that helps




The first dawn of smartness is to stop trying things you don't
  know anything about----especially if they run to anything 
over a dollar.


Sentinel Trading
rjbiii@xxxxxxxxx





____________________Reply Separator____________________
Subject: EL help needed.
Author: Murray Gray
Date:  6/28/99 1:49 PM

Greetings gentles all.

I'm trying to code something in EL and was wondering whether I'm going
about it the hard way.  Your assistance would be greatly appreciated.

I enter long on a particular bar at some particular price and I want to
make the stop the previous bar's close minus some step value.

How does one refer to the bar that is one back from the Entrybar?

At the moment I am waiting until the bar after entry and using something
like:

   If BarsSinceEntry = 1 and MarketPosition > 0 
   then ExitLong at Close[2] - step

   If BarsSinceEntry = 1 and MarketPosition < 0 
   then ExitShort at Close[2] + step

Alas, this approach is not proving very reliable.  Usually what happens is
that 10 or 20 bars later in the day the market will go thru the stop price
and not exit the position.  Its like the order is not valid any more?  Or
TS has forgotten about it?

Any help on devising a strategy to achieve a reliable solution would be
great appreciated,  8-)

Murray.