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-2010, 03:50 PM   #46
BBzDan
Junior Member
 
Join Date: Jun 2009
Location: Toronto, Canada
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
Default

What's the difference between look back period and bars ago, when both of them apear in strategy wizard?

For example, MA cross below strategy can have both these parameters, what's the difference between MAfast cross bellow MAslow 2 look back periods, and MAfast < MAslow 2 bars ago (assume 1 min chart)?

What happens if one is different than the other one?

Thx.
BBzDan is offline  
Reply With Quote
Old 02-15-2010, 07:36 AM   #47
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

Lookback period for the CrossAbove/Below choices is not the same as bars ago.

Setting lookback period to 2 means your cross will look for a cross to happen anywhere inbetween the current bar and 2 bars ago.

Setting bars ago to 2 means your value of the current bar needs to be less than the value 2 bars ago. It doesn't matter if a cross happened or not. It just has to be lower.
NinjaTrader_Josh is offline  
Reply With Quote
Old 02-16-2010, 04:29 PM   #48
BBzDan
Junior Member
 
Join Date: Jun 2009
Location: Toronto, Canada
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
Default

Got it, thank you.
Dan
BBzDan is offline  
Reply With Quote
Old 02-19-2010, 09:35 AM   #49
jp2890
Member
 
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
Default

In respect of a typical 12,26,9 MACD strategy, I just changed the EMA to (Close 3) and I got a smoother line.

In fact, what does it meant if I change the value of (Close) to 3?

Thanks!
jp2890 is offline  
Reply With Quote
Old 02-19-2010, 10:15 AM   #50
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

Not sure I follow you, which of the three inputs of the MACD did you adjust?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-20-2010, 07:30 AM   #51
jp2890
Member
 
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
Default

In respect of a typical 12,26,9 MACD strategy, at the Input series: I altered the DefaultInput to EMA and period 3.

The 12,26,9 are unchanged, I got a smoother MACD.

The condition is

CrossAbove(MACD(EMA(3),12,26,9),MACD(EMA(3),12,26,9)Avg,1)


What does it mean if I change the period of EMA in such?
jp2890 is offline  
Reply With Quote
Old 02-21-2010, 03:43 PM   #52
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

jp2890, the EMA is what is passed to the MACD. So changing the period of the EMA is just changing the EMA which is fed to the MACD. I'm not sure of the specifics of your strategy, but in general increasing the period of any moving average just introduces undesirable "lag" into the strategy.
NinjaTrader_Austin is offline  
Reply With Quote
Old 02-22-2010, 08:04 AM   #53
jp2890
Member
 
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
Default

Thank you Austin!
jp2890 is offline  
Reply With Quote
Old 02-25-2010, 07:29 AM   #54
jp2890
Member
 
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
Default

Any suggestions on how to set strategy just rely on one curve, say EMA 50?
jp2890 is offline  
Reply With Quote
Old 02-25-2010, 08:20 AM   #55
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

Sure, you could just for example compare the EMA 50 value on the left side to the EMA 50 value 5 bars ago and then create an action based on this, bars back can referend via the barsAgo parameter.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-25-2010, 08:39 AM   #56
jp2890
Member
 
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Bertrand!


How to reduce the choppy buy and sell actions in such one line strategy?
jp2890 is offline  
Reply With Quote
Old 02-25-2010, 08:45 AM   #57
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

You're welcome - you dip into a question many people spend considerable development time in...so there's many ways to improve such a strategy, for example time filters, a min range over the last x bars, trading only if the EMA has a certain slope...you will need to experiment with it.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-25-2010, 08:55 AM   #58
jp2890
Member
 
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Betrand!

Where can I find more about using only one line for strategy?

Any name for this?
jp2890 is offline  
Reply With Quote
Old 02-25-2010, 08:58 AM   #59
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

None I'm aware of - guess it would be best if you reviewed the help guide section around the Strategy Wizard and then take it from there -

http://www.ninjatrader-support.com/H...rdScreens.html
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-25-2010, 09:19 AM   #60
jp2890
Member
 
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
Default

Downloaded some indicators from your reference samples, say KeyReversalDown, NBarsUp etc....., any related to one line strategy?
Last edited by jp2890; 02-25-2010 at 09:28 AM.
jp2890 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
What about MACD X Over evensteven Suggestions And Feedback 2 02-27-2011 10:47 AM
Help with MACD strategy tomonly23 Automated Trading 8 02-10-2010 02:05 AM
MACD with up down arrows on MACD signal line crosses moonriver Indicator Development 1 12-03-2008 10:34 AM
Simple MACD Strategy Problem diamondpearl Strategy Development 13 12-02-2008 10:35 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 09:42 PM.