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 |

Can you code a simple indicator for me? Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
rcooper1
Posted : Monday, January 24, 2011 11:44:26 AM
Registered User
Joined: 6/25/2010
Posts: 44
This should be simple (for anyone else). I am looking for an indicator that will reflect the (10 Day SMA of the Close)*(Variable), where I set the variable. The only complication is that the calculation should use 9 previous closing prices plus the live last price. Thanks!Richard
Bruce_L
Posted : Monday, January 24, 2011 11:56:55 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
'# Variable = UserInput.Single = 1
'# SMAperiod = UserInput.Integer = 10
Plot = Variable * Price.AVGC(SMAperiod)

RealCode for Real People: Indicators

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rcooper1
Posted : Monday, January 24, 2011 1:57:11 PM
Registered User
Joined: 6/25/2010
Posts: 44
Thanks Bruce. But where should I set the variable? When I change the line'# Variable = UserInput.Single = 1 to read '# Variable = UserInput.Single = 1.02, I do not get a change in the indicator.Richard
Bruce_L
Posted : Monday, January 24, 2011 1:59:06 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
We used a UserInput so you don't have to Edit the RealCode.

Once it is created, you can left-click on the Indicator to Edit the UserInput value for the Variable.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rcooper1
Posted : Monday, January 24, 2011 2:05:56 PM
Registered User
Joined: 6/25/2010
Posts: 44
I didn't even realize....thanks so much!
Bruce_L
Posted : Monday, January 24, 2011 2:08:00 PM


Worden Trainer

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

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rcooper1
Posted : Monday, January 24, 2011 3:24:32 PM
Registered User
Joined: 6/25/2010
Posts: 44
Here is an even simpler one...how would I code an indicator that was merely Constant/LastPrice. I am trying to create an indicator that will generate my order size, where Constant is the Dollar size of my orders. Thanks
Bruce_L
Posted : Monday, January 24, 2011 3:29:51 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
'# Constant = UserInput.Single = 1000
Plot = Constant / Price.Last

-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.