Gold Customer
Joined: 1/30/2007 Posts: 3
|
Help with real code please.
1. The stock should be down at least two days in a row. (lower High)
2. We need a wide-range bar (>= $1.00) on the current day.
3. The open of the current day must be in the top 20% of the day's price range.
4. The close must be in the bottom 20% of the day's price range.
5. The next day the stock (gaps) up by at least $0.50 to $1.00 above the previous day's closing price. then pass
Do any calculation take place in a layout after you close it.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm pretty sure no calculations can take place on a Layout that is not open as I cannot imagine how such calculations could occur.
Assuming the only criteria for your "wide-range bar" is the range must be at least a dollar, you may wish to try the following RealCode Rule:
If Price.High(1) < Price.High(2) AndAlso _
Price.High(2) < Price.High(3) AndAlso _
Price.High(1) - Price.Low(1) >= 1 AndAlso _
Price.High(1) - Price.Open(1) <= .2 * (Price.High(1) - Price.Low(1)) AndAlso _
Price.Last(1) - Price.Low(1) <= .2 * (Price.High(1) - Price.Low(1)) AndAlso _
Price.High(1) > Price.Last(1) AndAlso _
Price.Open >= Price.Last(1) + .5 Then Pass
-Bruce Personal Criteria Formulas TC2000 Support Articles
|