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 Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 09-22-2011, 12:29 PM   #1
DropZone
Junior Member
 
Join Date: Sep 2011
Posts: 4
Thanks: 2
Thanked 0 times in 0 posts
Default Calculating the EMA of the Pivot

Hi,

I want to plot the EMA of a pivot but I get an error informing me that I have a type mis-match (double vs IDataSeries). I understand why I am getting this message, but could you please tell me how to, or is it possible to plot the EMA/SMA etc for a pivotpoint?



double pivotvalue = (Close[0] + High[0] + Low[0]) / 3;


FastPlot.Set(EMA(pivotvalue,Fast)[0]); //Fast is an input for the moving average length

Thanks,
Ron
DropZone is offline  
Reply With Quote
Old 09-22-2011, 12:35 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi Ron,

Thanks for the post and welcome to the NinjaTrader forums!

Yes, would need to convert that value into a data series. This post can help work with custom data series:
http://www.ninjatrader.com/support/f...ead.php?t=7299

The value you're looking for is already available as a series, so you can also just pass in Typical there.

FastPlot.Set(EMA(Typical, Fast)[0]);
NinjaTrader_RyanM is offline  
Reply With Quote
The following user says thank you to NinjaTrader_RyanM for this post:
Old 09-22-2011, 12:49 PM   #3
DropZone
Junior Member
 
Join Date: Sep 2011
Posts: 4
Thanks: 2
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_RyanM View Post
Hi Ron,

Thanks for the post and welcome to the NinjaTrader forums!

Yes, would need to convert that value into a data series. This post can help work with custom data series:
http://www.ninjatrader.com/support/f...ead.php?t=7299

The value you're looking for is already available as a series, so you can also just pass in Typical there.

FastPlot.Set(EMA(Typical, Fast)[0]);
Hi Ryan,

Thank you so very much!

Regards,
Ron
DropZone is offline  
Reply With Quote
Reply

Tags
ema, pivot

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
Bars Since Pivot High or Pivot Low Baseheadz Indicator Development 7 08-14-2011 11:38 PM
Calculating Slope cmspruill Strategy Analyzer 1 03-23-2011 02:39 AM
Calculating Gain tradetree Strategy Development 3 03-11-2011 08:17 AM
Double EMA needs a price option (OHLC)for each EMA simpletrades Indicator Development 9 08-31-2009 07:20 AM
Using the Strategizer how do I write the entry EMA & exit using another EMA gygraham Strategy Development 1 02-05-2008 01:48 PM


All times are GMT -6. The time now is 10:54 AM.