high/low filter in easylanguage

Discussion in 'Strategy Development' started by travis, Jun 29, 2003.

  1. travis


    I have been working on an intraday (5 minute timeframe) system on futures, which does well on the last two years, based on moving average crossovers, time limits, and a weekly price-volume trend filter that allows the system to only accept long/short signals on a given week.

    Now a few people have told me to implement a filter based on yesterday's lows/highs, intended as supports/resistances. If the system gets a signal near those levels, it should be accepted, otherwise not.

    If this principle worked, I could shorten the length of the moving averages and reduce the stoploss, and maybe widen the time zones. But the question is how do you implement such a principle in easylanguage? How do you tell your system "accept a signal only if it originates from this area near yesterday's high/low, or near this swing's high/low"?
  2. Travis,

    A good idea for this type of question is to post on tradestationworld.com where a number of Easylanguage experts give prompt answers to this type of question.

    I'll give you an option as I understand your request:

    {create an entry conditional statement that permits a trade if the price is within x where x is 0.50 or whatever you want it to be.}

    value1 = yhigh; {yhigh is a function that calculates yesterday's high} I think Easylanguage has a similar function but I don't remember what they call it.}

    condition1 = absvalue(close -yhigh) <=x; {checks to see if the most recent price is close enough to yesterday's high)

    if condition1 then buy next bar at {Whatever price you want to put here};

  3. travis


    Thank you very much, I will go where you said to ask the same question, and I will try your advice.