NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript File Sharing > NinjaScript File Sharing Discussion

NinjaScript File Sharing Discussion Discussion for shared NinjaScript files.

Reply
 
Thread Tools Display Modes
Old 10-26-2007, 01:03 PM   #1
Rollins
Senior Member
 
Join Date: Sep 2007
Posts: 201
Thanks: 0
Thanked 0 times in 0 posts
Default Double EMA Multi Colored

A double EMA which changes color and displays an arraw when its trend changes. Thanks to Josh for showing how to draw a multi colored line.

Edit:v1.1 Arrows are now optional, and displacement for the arrows can be specified
Edit:v1.2 Arrows are drawn on the chart, dragging is impossible (thanks to Gumphie's ModHeikenAshi)
Edit:v1.3 adjusted for intra bar calculation
Edit:v1.4 changed to MA on MA
Attached Files
File Type: zip Double_EMA_v1.0.zip (3.9 KB, 229 views)
File Type: zip DoubleMA_v1_4.zip (15.6 KB, 164 views)
Last edited by Rollins; 02-20-2008 at 05:49 AM.
Rollins is offline  
Reply With Quote
Old 12-27-2007, 11:38 AM   #2
edgeliner
Senior Member
 
Join Date: Oct 2007
Location: Southy Florida
Posts: 263
Thanks: 16
Thanked 1 time in 1 post
Default

Rollins......

Could you please elaborate on the Double EMA? How can you apply this to a strategy? Thanks!
edgeliner is offline  
Reply With Quote
Old 12-27-2007, 03:03 PM   #3
Rollins
Senior Member
 
Join Date: Sep 2007
Posts: 201
Thanks: 0
Thanked 0 times in 0 posts
Default

Hey edgeliner, I'm currently not trading indicators but the person I copied the double EMA from used it to determine trend direction + momentum.

Problem might be that you could miss most of the move buy tops/sell bottoms, but depends mostly on your trading style.

This indicator is for charts because it uses 3 different plots, you can easily make your own double EMA for a strategy or use Ray's
Rollins is offline  
Reply With Quote
Old 12-27-2007, 04:20 PM   #4
edgeliner
Senior Member
 
Join Date: Oct 2007
Location: Southy Florida
Posts: 263
Thanks: 16
Thanked 1 time in 1 post
Default

Thanks Rollins!
edgeliner is offline  
Reply With Quote
Old 01-28-2008, 02:32 PM   #5
NinjaCustomer
Senior Member
 
Join Date: Jan 2008
Posts: 130
Thanks: 0
Thanked 0 times in 0 posts
Question

anyone have a regular EMA that will color itself depending on whether it is going up or down?
NinjaCustomer is offline  
Reply With Quote
Old 01-28-2008, 10:41 PM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You can accomplish that by following this reference sample: http://www.ninjatrader-support.com/v...ead.php?t=3227

Change the SMA to EMA.
NinjaTrader_Josh is offline  
Reply With Quote
Old 02-19-2008, 10:32 PM   #7
Paul_J
Member
 
Join Date: Jan 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default Double EMA Multi Colored

Hey Rollins,

Very nice indicator - I like it a lot. Is there a way to make the period
"user adjustable"?

Thanks,
Paul_J is offline  
Reply With Quote
Old 02-20-2008, 05:54 AM   #8
Rollins
Senior Member
 
Join Date: Sep 2007
Posts: 201
Thanks: 0
Thanked 0 times in 0 posts
Default

Paul,

I haven't looked at the old version in a long time, but imo setting the period has always been supported, so I'm not certain what kind of feature you are looking for. The latest version which I made a couple of months ago, got several improvements. However I'm not in a hurry to make any further updates, since I've got plenty of other more urgent/rewarding things to do.

Cheers
Rollins is offline  
Reply With Quote
Old 02-20-2008, 08:22 AM   #9
Paul_J
Member
 
Join Date: Jan 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default Double EMA Multi Colored

Hi Rollins,

Sorry for not being clearer - I can input a different period as long as the
number is over it's default which is 24, but it will not accept any number
below 24 (when I try - it resets back to 24).

I'm presently using NT version 6.5 but the same thing happens even with
NT version 6.0.

You say that it should support any input and you're probably right (since
you're the one that made it). It is probably a glitch on my end.

I appreciate you reading and replying to my post.


Good trading.
Paul_J is offline  
Reply With Quote
Old 02-20-2008, 02:28 PM   #10
Rollins
Senior Member
 
Join Date: Sep 2007
Posts: 201
Thanks: 0
Thanked 0 times in 0 posts
Default

Paul,

I've tested the 1.4 version which I uploaded and it allows the kind of settings you are looking for. As for 1.0, it could be that there was a bug in the code, however no one complained about that before.

Cheers
Rollins is offline  
Reply With Quote
Old 02-20-2008, 02:32 PM   #11
thrunner
Member
 
Join Date: May 2007
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by Paul_J View Post
Sorry for not being clearer - I can input a different period as long as the number is over it's default which is 24, but it will not accept any number below 24 (when I try - it resets back to 24).
You are right, but you can change this under the properties section of the code:
Code:
        [Description("")]
        [Category("Parameters")]
        public int Period
        {
            get { return period; }
            set { period = Math.Max(24, value); }
        }
        #endregion
thrunner is offline  
Reply With Quote
Old 02-20-2008, 03:15 PM   #12
Paul_J
Member
 
Join Date: Jan 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default Double EMA Multi Colored

Thanks Rollins.

Thrunner - thanks for the suggestion.
Paul_J is offline  
Reply With Quote
Old 02-20-2008, 03:49 PM   #13
Paul_J
Member
 
Join Date: Jan 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default

WOW Rollins! You outdid yourself!
This one is much better than the old one.

MANY THANKS! And happy trading!
Paul_J is offline  
Reply With Quote
Old 01-13-2009, 07:12 AM   #14
capstone
Member
 
Join Date: May 2008
Posts: 39
Thanks: 0
Thanked 0 times in 0 posts
Default anyone using this...

and get the chart prices compressed when setting the indicator to false on calculate on bar close ??
capstone is offline  
Reply With Quote
Old 01-13-2009, 07:18 AM   #15
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

I am not using this indicator so I do not know, but as a guess try checking your AutoScale settings? If not then it could be a bug in the code.
NinjaTrader_Josh 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
Colored Support and Resistance Zones CarlosAlberto Indicator Development 20 01-28-2009 07:33 AM
Indicator: Multi-Colored Plots NinjaTrader_Josh Reference Samples 0 09-06-2007 01:28 PM
Multi Colored plots. higler General Programming 6 05-10-2007 12:05 PM
Double moving average ,double time frame Mauro60 Indicator Development 3 01-23-2007 02:11 AM
Multi strategies, multi superDOM windows N40K Miscellaneous Support 1 12-20-2004 01:51 AM


All times are GMT -6. The time now is 01:51 PM.