![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Member
Join Date: Apr 2008
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
|
I remember a good while ago Elliot looking for something like this and he shared the Modified Optimal Elliptical Filter. The indicator is in Easy language. If someone could translate it, it would be very useful to all NT users.
Here's a pic comparing them. Jurik is cyan and Quick is yellow. Also attached is the code is in the zip file. okay also posting the code. Quote:
Last edited by Ninja B; 12-06-2008 at 09:43 AM.
|
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
As a last resort you can try a 3rd party NinjaScript Consultant here if you want: http://www.ninjatrader.com/webnew/pa...injaScript.htm
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
|
MOEF is in this thread if anyone needs it.
http://www.ninjatrader-support2.com/...ad.php?p=42360 BTW, when it comes to short periods I've found that the closest thing to the JMA is the ADXVMA. For longer periods I think ZiNonLagMA and StepMA are just as good if not better than the JMA. Also if you post the actual code you might have better luck than an ELD file which requires TS to open. |
|
|
|
|
|
#4 |
|
Member
Join Date: Apr 2008
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
|
^^^ Thanks. I use StepMA also. It's great. Posted the actual code.
|
|
|
|
|
|
#5 |
|
Member
Join Date: Nov 2008
Location: Australia
Posts: 64
Thanks: 0
Thanked 0 times in 0 posts
|
As a Ninja beginner
and non-programmer, I am entering the steep learning curve of going beyond the strategy builder.I am trying to generate some strategies with the huge selection of MovingAverages. I see several indicators where lines change in color depending on trend conditions. However how do you use this in strategies? As a simple approach I tried to use the ZiNonLagMA in a strategy, E.g. Just trying to buy where yellow goes to green and sell when green to yellow or red. Is there a way to use the Plot Values "UpTrend", "DownTrend" and "NonTrend" directly in a strategy with some sort of a boolean expression? e.g. If ..... is "UpTrend" then .... It does not work with the strategy builder. After looking at the indicator code, I tried to use the sTrend expression in a strategy with UpTrend: "if ( ZiNonLagma.sTrend[0] > 0 && ZiNonLagma.sTrend[1] > 0 )" then .... DownTrend: "if ( ZiNonLagma.sTrend[0] < 0 && ZiNonLagma.sTrend[1] < 0 )" then .... It did not do what I wanted, but these expressions appear to trigger at least something. However I got totally stuck with the NonTrend part. If I understand the code in the indicator file correctly the NonTrend is determined first (before the Up and Downtrend) via a user definable filter calculation. // Plot Non Trend Values[2].Set( 0, serie[0] ); sTrend[0] = sTrend[1]; if ( serie[0] - serie[1] > filter * TickSize / splitTick ) sTrend.Set( 0, 1); else if ( serie[1] - serie[0] > filter * TickSize / splitTick ) sTrend.Set(0, -1); else sTrend.Set(0, 0); I tried using "ZiNonLagma.sTrend[0] = ZiNonLagma.sTrend[1]" as exit condition, but that did not work. Anybody an idea or pointer on how to use the ZiNonLagMA correctly in a strategy? PS I attached my non working teststrategy and the ZiNonLagMa indicator as this indicator was non easy to find... just stumbled on it when reading the posts. |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Not sure exactly what you are trying. You cannot create plots from a strategy. However you can create DataSeries and the access it the information just like a plot.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Above MA bar is green, below MA bar is red? | BottomShark77 | NinjaScript File Sharing Discussion | 1 | 12-01-2008 05:24 AM |
| Rethink MA | pivot44 | Suggestions And Feedback | 1 | 11-20-2008 02:14 PM |
| MA Envelopes | niterider | Charting | 1 | 06-26-2008 09:11 AM |
| MA Crossover | joecgoodman | Indicator Development | 3 | 06-03-2008 02:08 PM |
| MA suggestion | nicko9 | Historical NinjaTrader 6.5 Beta Threads | 1 | 03-12-2008 03:10 AM |