NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 11-05-2007, 01:56 PM   #1
Shiva Swinger
Member
 
Join Date: Feb 2005
Location: , ,
Posts: 57
Thanks: 0
Thanked 0 times in 0 posts
Default Moving Average calculation

Ray,

Could you add the AVERAGE calculation as an additional option in moving averages like VMA etc (if you have not already done so)

This is

HIGH + LOW + CLOSE /3. Quite a few strategies use this type of calculation and it would be great to have in your charts.

Thanks
Shiva Swinger is offline  
Reply With Quote
Old 11-05-2007, 02:11 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

It already exists. When placing any moving average on a chart, there is a 'Price type' parameter that can be set. Set this to 'Typical'.

In NinjaScript, you would do something like:

double myAverageSmaValue = SMA(Typical, 20)[0];
NinjaTrader_Ray is offline  
Reply With Quote
Old 11-26-2008, 10:15 AM   #3
Shiva Swinger
Member
 
Join Date: Feb 2005
Location: , ,
Posts: 57
Thanks: 0
Thanked 0 times in 0 posts
Default Number of Lots

Ray,

You have any plans for the number of lots traded in the ACCOUNT PERFORMANCE. Would be helpful to know total lots traded in a day/week/month for negotiating rates etc.

Also any chance of being able to keep MARKET ANALYZER Always on TOP.

Thanks
Shiva Swinger is offline  
Reply With Quote
Old 11-26-2008, 10:21 AM   #4
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

Shiva,

You could export the Performance Report into Excel and just run a quick summation on the quantity column for your trades.

Market Analyzer already has an Always on Top feature. Right click and it is in the list.
NinjaTrader_Josh is offline  
Reply With Quote
Old 11-26-2008, 10:22 AM   #5
Shiva Swinger
Member
 
Join Date: Feb 2005
Location: , ,
Posts: 57
Thanks: 0
Thanked 0 times in 0 posts
Default

Well Ray,

Just found the Always on Top...so Thanks but the number of lots is still a query?

Thanks
Shiva Swinger is offline  
Reply With Quote
Old 11-26-2008, 10:24 AM   #6
Shiva Swinger
Member
 
Join Date: Feb 2005
Location: , ,
Posts: 57
Thanks: 0
Thanked 0 times in 0 posts
Default

OK Josh,

Thanks for that. Perhaps that simple feature could be added to next version.
Shiva Swinger is offline  
Reply With Quote
Old 11-26-2008, 10:36 AM   #7
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

Thank you for your suggestion. I will put it on the list of future considerations.
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
Moving average of Pivot points nightowl Charting 3 07-01-2008 02:19 PM
Moving Average of a Indicator buderim Indicator Development 56 05-05-2008 12:05 AM
Moving Average Envelope fetus Charting 1 09-24-2007 03:58 PM
Hull Moving Average prostyle Indicator Development 1 08-30-2007 01:34 AM
Price parameter in Moving Average bmaltz Indicator Development 10 06-09-2007 12:16 PM


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