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

Re: Quick EL question



PureBytes Links

Trading Reference Links

> 2) If so, check to see if the last price is outside of a 25% range of the
> closing price of the prior day's trading.
<snip>
>         IF Close > Close[1] + (Pct * Close[1])

It's easy to see the problems. 

1. Your system, as stated in the text, could never trigger unless the
price moved 25% in a DAY. I assume you really mean 25% of the day's
range (high - low).

2. Your system, as stated in the code, could never trigger unless the
price moved 25% in a SINGLE BAR.

Coding the answer would take more time than I have. Suggestions...
calculate the previous DAY's range. Record the previous DAY's close. At
your trade time, compare the price to the previous day's close +/- 
(.25 * previous day's range). Remember, Close[1] refers to the previous
bar not the previous day.

-- 
   Dennis