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 > Indicator Development

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

Reply
 
Thread Tools Display Modes
Old 02-14-2009, 12:59 PM   #1
suedeuno
Member
 
Join Date: Jun 2007
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
Default how to reference macd signal and average?

How do you reference the macd signal line and average line values?
suedeuno is offline  
Reply With Quote
Old 02-14-2009, 02:33 PM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Hi suedeuno, here are the different MACD values you can access directly -

Code:
// current MACD value 
double value = MACD(12, 26, 9)[0]; 

// current MACD average value 
double value = MACD(12, 26, 9).Avg[0]; 

// current MACD difference value 
double value = MACD(12, 26, 9).Diff[0];
NinjaTrader_Bertrand 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
Simple MACD signal crossover question altrader Strategy Development 17 05-24-2011 07:10 AM
ATM strategies: signal price instead of average entry price mario73 ATM Strategies (Discretionary Trading) 1 01-02-2009 02:49 AM
MACD with up down arrows on MACD signal line crosses moonriver Indicator Development 1 12-03-2008 10:34 AM
how can i plot an exponential moving average of MACD? Willl Charting 1 06-05-2008 11:14 AM
Using MACD.avg vs. MACD Jim-Boulder Strategy Development 1 05-23-2007 07:41 AM


All times are GMT -6. The time now is 05:33 PM.