![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: May 2007
Location: , ,
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
|
Hello all,
Is there anybody on this board able to translate the SMI : Stochastic Momentum Indicator by William Blau. The result is an oscillator that ranges between +/- 100 and is a bit less erratic than an equal period Stochastic Oscillator. While similar to the Stochastic Oscillator, the SMI displays where the close is relative to the midpoint of the recent high/low range, as compared to the close relative to the recent high/low with the Stochastic Oscillator. This results is an oscillator that ranges between -100 and +100 and can be a bit less erratic than an equal period Stochastic Oscillator. An example formula (see Stochastic Momentum Index) illustrates the calculation of the Stochastic Momentum Index. When the close is greater than the midpoint of the range, the SMI is positive. When the close is less than the midpoint of the range, it is negative. The interpretation of the SMI is virtually identical to the Stochastic Oscillator. Stochastic Momentum Indicator 100 * ( Mov( Mov(C - (.5 * ( HHV(H,13) + LLV(L,13))),25,E),2,E)/ (.5*Mov(Mov( HHV(H,13) - LLV(L,13),25,E),2,E))) Many thanks for your attention, Happy trading Cheers Angel |
|
|
|
|
|
#2 |
|
Member
Join Date: May 2007
Location: , ,
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
This is below the Easy Language code for the SMI, it would be so kind if someone could translate it in NT code. Sincerely, adding the SMI in our trading arsenal would be an edge !!! Thanks for your careful attention, Happy trading, Cheers Angel .................................................. .................................................. .... Type : Function, Name : SMI input: length1(NumericSimple), length2(NumericSimple), length3(NumericSimple); var: HH(0), LL(0); HH = Highest(H,length1); LL = Lowest (L,length1); SMI = 100 * (XAverage(XAverage(C-(0.5*(HH+LL)),length2),length3) / (0.5 * XAverage(XAverage(HH-LL,length2),length3))); .................................................. .................................................. ... Type : Indicator, Name : SMI input:length1(13),length2(25),length3(2),alertLeve l(40); plot1( smi(length1,length2,length3), "SMI" ); plot2( alertLevel, "sell line" ); plot3(-alertLevel, "buy line" ); if plot1 crosses above -alertLevel then alert("SMI crosses above buy line"); if plot1 crosses below alertLevel then alert("SMI crosses below sell line"); |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Sep 2007
Posts: 12
Thanks: 0
Thanked 1 time in 1 post
|
So, i put this together but am not sure if it is correct, as i have nothing to compare against. Some comments please? Or if someone would like to make some code adjustments, please do.
cheers Mat |
|
|
|
|
|
#4 |
|
Member
Join Date: Jul 2008
Posts: 34
Thanks: 0
Thanked 0 times in 0 posts
|
Doesn't look like this indicator works. It didn't show any data for me.
Thanks, Mahlon |
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,215
Thanks: 82
Thanked 332 times in 324 posts
|
Hi Mahlon,
I tested the indicator on my end and it plotted data as you can see in the screenshot. I suggest to delete the indicator via Tools-->Edit NinjaScript-->Indicator. Re-import the indicator and check if it will plot data. If not, please check the Log-tab for any error messages.
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Member
Join Date: Jul 2008
Posts: 34
Thanks: 0
Thanked 0 times in 0 posts
|
Jason,
Thanks for your help. I followed your suggestion and it worked great. Mahlon |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Nov 2008
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Jason,
this indicator looks great, but one problem is : it works on some instruments (eg FDAX), but not with others (eg ES) any hints what's the matter ? thanks in advance bluejay |
|
|
|
|
|
#8 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Hi bluejay,
This is not an indicator we made. You want to contact the original author, mwyatt.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Dec 2008
Posts: 5
Thanks: 0
Thanked 0 times in 0 posts
|
the smi indicator doesnt draw anything in my chart. (just empty)
any suggestion/help? in the log it says "DefaultError on plotting indicator 'StochasticMomentumIndex'. Please check the 'OnBarUpdate' or the 'Plot' method: Overflow error." |
|
|
|
|
|
#10 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
You would have to debug or ask the original author to do so.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Dec 2008
Location: Rolling Meadows, IL
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
|
Here is another version of Stochastic Momentum Index which doesn't get an Overflow error. I tested it against Thinkorswim built-in SMI indicator.
|
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Jan 2008
Posts: 103
Thanks: 0
Thanked 0 times in 0 posts
|
Hey Everyone,
Does anyone know how to set this to a 20/80 setting instead of -40/40? |
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
|
![]() You can also edit the script and in the initialize section change the line values. |
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Jan 2008
Posts: 103
Thanks: 0
Thanked 0 times in 0 posts
|
Hey EW,
The lines still plot normally. Is there a way to change this? |
|
|
|
|
|
#15 |
|
Senior Member
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
|
Its working fine for me here, unless I'm misunderstanding your problem.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stochastic Momentum Index | geoarb | Indicator Development | 21 | 03-14-2012 02:32 AM |
| Howard Indicator and Pesavento Pattern Swing Indicator | DORAIRAJ_S@HOTMAIL.COM | Indicator Development | 1 | 11-12-2007 12:28 AM |
| Using Strategy Wizard to develope Indicator on Indicator | mrlucky1x | Indicator Development | 3 | 08-25-2007 04:09 PM |
| Momentum Indicator | Quicktrader10 | NinjaScript File Sharing Discussion | 1 | 08-20-2007 02:11 AM |
| Momentum bars or Price Range Bars | Akros | Indicator Development | 7 | 06-10-2007 04:55 AM |