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 |

Slope of an EMA Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
spdudek
Posted : Wednesday, January 19, 2011 2:41:43 PM
Registered User
Joined: 2/18/2008
Posts: 20
Can you give me the real code to create an indicator for the slope of an EMA? What I'd like is an indicator that sits below the price chart and plots the values on a line graph. The formula would be (current EMA - previous bar's EMA)/ current bar's EMA *1000. I'd like to get the slope of a 13 bar EMA or ideally the slope of any EMA I plot over the price graph. Thanks!
Bruce_L
Posted : Wednesday, January 19, 2011 2:51:08 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
If you Drag and Drop the Moving Average from the Chart into the Code tab of the RealCode Editor, it should create something similar to the first line of the RealCode Indicator:

RealCode for Real People: Indicators

'# MA = chart.MovingAverage
Plot = (MA.Value - MA.Value(1)) / MA.Value * 1000

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
spdudek
Posted : Wednesday, January 19, 2011 3:01:18 PM
Registered User
Joined: 2/18/2008
Posts: 20
Great! Thank you.
Bruce_L
Posted : Wednesday, January 19, 2011 3:02:25 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
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.