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 06-30-2008, 07:45 AM   #1
mgin98
Member
 
Join Date: May 2008
Posts: 55
Thanks: 0
Thanked 0 times in 0 posts
Default Multitime frame strategy - overloaded indicator

How do I specify pricetype property to be applied to a multi timeframe indicator in a strategy?

Default timeframe is 1 minute. Secondary timeframe is 5 minute.

Initialize
Add(PeriodType.Minute, 5)

OnBarUpdate
if (CrossBelow(WMA(5), WMA(7), 1) && SMA(BarsArray[1], Median, 5)[0] >= WMA(BarsArray[1], High, 7)[0])
//do something

1501 "method SMA takes 3 arguments".
mgin98 is offline  
Reply With Quote
Old 06-30-2008, 08:12 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Try
if (CrossBelow(WMA(5), WMA(7), 1) && SMA(Medians[1], 5)[0] >= WMA(Highs[1], 7)[0])
NinjaTrader_Dierk is offline  
Reply With Quote
Old 06-30-2008, 09:46 AM   #3
mgin98
Member
 
Join Date: May 2008
Posts: 55
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks, that worked just fine.
mgin98 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
Multitime frequency system stefy Strategy Development 4 04-24-2008 03:07 PM
using different time/tick frame indicator in my 1 min strategy Willl Strategy Development 3 04-17-2008 10:41 AM
Indicator on other time frame ralph.ronnquist Strategy Development 5 12-07-2007 12:36 AM
Custon Indicator and multi-time frame scjohn Strategy Development 1 06-08-2007 11:34 PM
Minute Time Frame Indicators in a TickTime Frame strategy Nathamus General Programming 5 04-10-2007 02:41 AM


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