NinjaTrader Support Forum  

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

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 02-14-2009, 10:44 AM   #1
shakira
Junior Member
 
Join Date: Dec 2008
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
Default Simple question about a simple strategy.

I want to use "typical" price instead of the close in the SampleMAcrossover strategy.

How do I do that simple change?

Thanks in advance.

shakira
shakira is offline  
Reply With Quote
Old 02-14-2009, 10:56 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

Hi shakira, you need to modify the SMA calls then to use the overload that allows you to input the price type input you need, for example those would be the first two lone of code then...

Code:
SMA(Typical, Fast).Plots[0].Pen.Color = Color.Orange;
SMA(Typical, Slow).Plots[0].Pen.Color = Color.Green;
http://www.ninjatrader-support.com/H...verageSMA.html
Last edited by NinjaTrader_Bertrand; 02-14-2009 at 11:53 PM.
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 question frostengine Miscellaneous Support 3 10-08-2008 10:23 AM
Simple question. Drakmyre Charting 2 07-08-2008 10:49 PM
Simple Strategy question yoramva Strategy Development 5 04-03-2008 07:25 AM
simple charting question z32000 Charting 1 11-22-2007 01:44 PM
A simple question about performance. MGDavid Miscellaneous Support 2 06-21-2007 08:47 AM


All times are GMT -6. The time now is 04:18 AM.