![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#46 |
|
Junior Member
Join Date: Jun 2009
Location: Toronto, Canada
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#47 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#48 |
|
Junior Member
Join Date: Jun 2009
Location: Toronto, Canada
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
|
Got it, thank you.
Dan |
|
|
|
|
|
#49 |
|
Member
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
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! |
|
|
|
|
|
#50 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
Not sure I follow you, which of the three inputs of the MACD did you adjust?
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#51 |
|
Member
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
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? |
|
|
|
|
|
#52 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
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.
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#53 |
|
Member
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you Austin!
|
|
|
|
|
|
#54 |
|
Member
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
Any suggestions on how to set strategy just rely on one curve, say EMA 50?
|
|
|
|
|
|
#55 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
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.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#56 |
|
Member
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Bertrand!
How to reduce the choppy buy and sell actions in such one line strategy? |
|
|
|
|
|
#57 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
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.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#58 |
|
Member
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Betrand!
Where can I find more about using only one line for strategy? Any name for this? |
|
|
|
|
|
#59 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#60 |
|
Member
Join Date: Dec 2009
Posts: 48
Thanks: 0
Thanked 0 times in 0 posts
|
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.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |