NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 01-03-2012, 09:46 AM   #1
strewthmate
Junior Member
 
Join Date: Mar 2009
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default Simple indicator - Percent Change

Hi

I've tried to search for this but can't find it anywhere. It's a very simple calculation but I've no coding skills so am lost. I'm surprised it's not a standard calc for most platforms.

I simply want a rolling indicator that plots the day's percentage change (a) and the absolute percent movement (b). E.g. -2.5% for a and 2.5% for b. Separately or on the same chart it doesn't really matter, as long as I can then use the strategy analyser.

Close (or current level) minus previous close divided by the previous close.

Is there anywhere this could be found or could some kind soul knock this up quickly (even just a).

Many thanks
strewthmate is offline  
Reply With Quote
Old 01-03-2012, 09:52 AM   #2
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,770
Thanks: 158
Thanked 562 times in 553 posts
Default

Hello,

There are a few NetChange indicators which should accomplish this, or at least give you an idea of how this could be accomplished:

http://www.ninjatrader.com/support/f...&keys=1&ents=1
NinjaTrader_Matthew is offline  
Reply With Quote
Old 01-03-2012, 11:13 AM   #3
strewthmate
Junior Member
 
Join Date: Mar 2009
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default thanks

Thanks, they're close, but not quite there.

The net change doesn't show the percentage, while the display netchange just shows today's which doesn't allow for back testing. Appreciate any other ideas
strewthmate is offline  
Reply With Quote
Old 01-03-2012, 12:29 PM   #4
mate41
Senior Member
 
Join Date: Aug 2011
Location: France
Posts: 268
Thanks: 24
Thanked 15 times in 15 posts
Default

Hi strewthmate,
here is an other example of what you need..
Attached Files
File Type: zip InstrumData1.zip (3.2 KB, 48 views)
mate41 is offline  
Reply With Quote
Old 01-03-2012, 02:01 PM   #5
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,199
Thanks: 24
Thanked 1,225 times in 996 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by strewthmate View Post
Hi

I've tried to search for this but can't find it anywhere. It's a very simple calculation but I've no coding skills so am lost. I'm surprised it's not a standard calc for most platforms.

I simply want a rolling indicator that plots the day's percentage change (a) and the absolute percent movement (b). E.g. -2.5% for a and 2.5% for b. Separately or on the same chart it doesn't really matter, as long as I can then use the strategy analyser.

Close (or current level) minus previous close divided by the previous close.

Is there anywhere this could be found or could some kind soul knock this up quickly (even just a).

Many thanks
What you describe is what the shipping ROC indicator does.
Attached Images
File Type: png NTROC.png (29.5 KB, 77 views)
koganam is offline  
Reply With Quote
The following user says thank you to koganam for this post:
Old 01-04-2012, 01:08 AM   #6
strewthmate
Junior Member
 
Join Date: Mar 2009
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Excellent thanks. The ROC works. I completely missed that one as I assumed it just gave you the numerical ROC not the %. Many thanks.
strewthmate is offline  
Reply With Quote
Old 04-24-2012, 06:07 AM   #7
StarBright2009
Junior Member
 
Join Date: Sep 2009
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default Price Change

I am looking for an indicator similar to the ROC indicator.

The ROC (Rate-of-change) indicator displays the percent change between the current price and the price x-time ago.

I am looking for:

An indicator that displays the price change between the current price and the price x-time ago. Where similar to ROC, I can input a "Period" parameter and view all the price changes along the time line with that period difference. e.g., If I input a "period" of 1 on a daily chart, I would see the change in price for each day in the Data Box.

Thanks.
StarBright2009 is offline  
Reply With Quote
Old 04-24-2012, 06:16 AM   #8
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,199
Thanks: 24
Thanked 1,225 times in 996 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by StarBright2009 View Post
I am looking for an indicator similar to the ROC indicator.

The ROC (Rate-of-change) indicator displays the percent change between the current price and the price x-time ago.

I am looking for:

An indicator that displays the price change between the current price and the price x-time ago. Where similar to ROC, I can input a "Period" parameter and view all the price changes along the time line with that period difference. e.g., If I input a "period" of 1 on a daily chart, I would see the change in price for each day in the Data Box.

Thanks.
That is called the Momentum indicator.
koganam is offline  
Reply With Quote
Old 04-24-2012, 06:22 AM   #9
StarBright2009
Junior Member
 
Join Date: Sep 2009
Posts: 27
Thanks: 0
Thanked 0 times in 0 posts
Default

Excellent! That is exactly what I was looking for!

Thank you.
StarBright2009 is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion: simple but useful change for z-order JS999 Charting 1 10-26-2011 04:42 PM
Daily Percent Change on a 5-min Chart? fosch Indicator Development 15 08-18-2010 12:15 PM
Percent Change of an Indicator NTWolfe Strategy Development 3 04-05-2010 05:44 AM
filter conditions based on net change in units of percent marcussharp Market Analyzer 2 03-17-2010 11:52 AM
Percent Change Quote Window Quicktrader10 Miscellaneous Support 2 09-11-2006 12:46 AM


All times are GMT -6. The time now is 04:08 PM.