Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Real Code needed.... Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
lordnel
Posted : Tuesday, April 13, 2010 10:07:15 PM
Registered User
Joined: 3/30/2008
Posts: 97

What would the real code be to create the following condition to use in scans:

A bearish engulfing bar in which the range of today's closing bar (end of day) was greater than the day before's range (ie: today's high was higher than yesteraday's high, and today's low was lower than yesterday's), and, also, today's close was lower than yesterday's close.   If I could get that, it would be great.

If the condition could also be written so that, at the same time, today's  7-period Wilder's RSI must be at least 71 or higher (overbought), that would be phenomenal.

And lastly, if another stipulation could be that, ideally, the engulfing bar that shows up in this scan is the highest bar of, say, the last 5 days (editable period  of course in case I need to modify it).... then this would be out of this world!!

Thanks in advance.

StockGuy
Posted : Tuesday, April 13, 2010 10:57:13 PM

Administration

Joined: 9/30/2004
Posts: 9,187
Create a RealCode rule (or condition in version 5) with the following code and name it Bearish Engulfing.

'# NewHighPeriod = userinput.integer = 5
If price.High=price.MaxHigh(newhighperiod) AndAlso _
 price.Close(1)>price.Open(1) AndAlso _
 price.Open>price.Close(1) AndAlso _
 price.Close<price.Open(1) AndAlso _
 price.low < price.low(1) Then pass

Then plot Wilder's RSI and created a rule Greater than Value and set the Value to 70.99

Now, drag the Bearish Engulfing rule onto the RSI rule and select Create Combo.  You now have a rule for a bearish engulfing candle and RSI 7 greater than 70.99.
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.