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 |

atr 2nd request Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jgivens1
Posted : Monday, October 25, 2010 3:11:00 PM
Registered User
Joined: 2/15/2007
Posts: 22

I am trying to use real code to create an entry when the close is greater than the prior close + 1.2 times the 10 day atr.  Neither one of these works.  Can you correct my work?



# ATR = indicator.Average True Range
If Price.Close > (Price.Close(1) + (1.2 * ATR.value)) Then Pass

# ATR = indicator.Average True Range
If Price.Close > (Price.Close(1) + (1.2 * ATR.10)) Then Pass

Bruce_L
Posted : Monday, October 25, 2010 3:15:29 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Please try the following instead:

'# ATR = indicator.Library.Average True Range
If Price.Close > (Price.Close(1) + (1.2 * ATR.value)) Then Pass

If it doesn't seem to work, try Dragging and Dropping an ATR into the RealCode Editor or selecting Import Indicator from within the RealCode Editor to create the first line.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
StockGuy
Posted : Monday, October 25, 2010 3:15:35 PM

Administration

Joined: 9/30/2004
Posts: 9,187

You need to add ATR to the code using the Import Indicator button or by dragging an ATR plot into the RealCode condition editor.

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.