NexusFi: Find Your Edge


Home Menu

 





SMI4 Replication in EasyLanguage


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Big Mike with 3 posts (2 thanks)
    2. looks_two TheWizard with 1 posts (1 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 daedalus with 1 posts (0 thanks)
    1. trending_up 4,623 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 2 attachments




 
Search this Thread

SMI4 Replication in EasyLanguage

  #1 (permalink)
daedalus
Omaha, NE
 
Posts: 47 since Nov 2009
Thanks Given: 15
Thanks Received: 25

Well the title states the objective...

I have a fairly rudimentary version of SMI in easylanguage....

But as you can see the indicator is nothing like the SMI4 indicator provide by TheWizard in the latest Holy Grail package.

I don't very much need the dots or coloring, but I would like to mimic the SMI4's calculations for its +/-0 bias in its calculation.

Apparently its more than just a simple change of the calculation periods (I think at least?).

Can anyone tell me what changes have been made to SMI4 from the most basic rudimentary basic SMI indicator?

I've attached similar timeframes of the same shot comparing the two indicators (keep in mind these platforms calculate range bars slightly differently and they are from different data feeds so they won't be 100%).

Attached Thumbnails
Click image for larger version

Name:	6J 03-10  2_19_2010 (4 Range).jpg
Views:	356
Size:	92.8 KB
ID:	8471   Click image for larger version

Name:	1.jpg
Views:	314
Size:	117.7 KB
ID:	8472  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603


Thanks for the effort to start converting these

I found SMI elsewhere, this is just a very basic one:

Function
 
Code
                            
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))); 

Indicator
 
Code
                            
Type IndicatorName SMI                      
input
:length1(13),length2(25),length3(2),alertLevel(40);
           
plot1smi(length1,length2,length3), "SMI" );
            
plot2alertLevel"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"); 


[img]https://nexusfi.com/v/wswxug.gif[/img]

I've not compiled anything in MultiCharts yet but don't expect any problems. I don't use this one personally although I know many traders here do, so if you would be so kind as to share the final code please do. Upload it to the file sharing section (Downloads), let me know if you run into any problems sharing certain extensions.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603

BTW, you might contact Todd. He knows a lot about SMI and had a lot of custom work done to the version that many people use here on nexusfi.com (formerly BMT).

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 mihabibi 
Indianapolis,IN
 
Experience: Intermediate
Platform: Ninja Trader
Broker: AMP Futures/Zen-Fire
Trading: Emini Futures
Posts: 3 since Feb 2010
Thanks Given: 6
Thanks Received: 1


daedalus View Post
Well the title states the objective...

I have a fairly rudimentary version of SMI in easylanguage....

But as you can see the indicator is nothing like the SMI4 indicator provide by TheWizard in the latest Holy Grail package.

I don't very much need the dots or coloring, but I would like to mimic the SMI4's calculations for its +/-0 bias in its calculation.

Apparently its more than just a simple change of the calculation periods (I think at least?).

Can anyone tell me what changes have been made to SMI4 from the most basic rudimentary basic SMI indicator?

I've attached similar timeframes of the same shot comparing the two indicators (keep in mind these platforms calculate range bars slightly differently and they are from different data feeds so they won't be 100%).

Is is true that SMI4's histogram is lagging? I examined the indicator's code, and it uses data from a subsequent cycle to set the histogram's value for the preceding cycle. Here is the code inside the indicator:

if (Falling(esmis))
{
eSMIdn.Set(
1, esmis[1]);
eSMIdn.Set(esmis[
0]);

}
if (Rising(esmis))
{
eSMIup.Set(
1, esmis[1]);
eSMIup.Set(esmis[
0]);

}

Reply With Quote
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603


mihabibi View Post
Is is true that SMI4's histogram is lagging? I examined the indicator's code, and it uses data from a subsequent cycle to set the histogram's value for the preceding cycle. Here is the code inside the indicator:

if (Falling(esmis))
{
eSMIdn.Set(
1, esmis[1]);
eSMIdn.Set(esmis[
0]);

}
if (Rising(esmis))
{
eSMIup.Set(
1, esmis[1]);
eSMIup.Set(esmis[
0]);

}

That code repaints. You can learn more about repainting here.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224


daedalus View Post
Well the title states the objective...

I have a fairly rudimentary version of SMI in easylanguage....

But as you can see the indicator is nothing like the SMI4 indicator provide by TheWizard in the latest Holy Grail package.

I don't very much need the dots or coloring, but I would like to mimic the SMI4's calculations for its +/-0 bias in its calculation.

Apparently its more than just a simple change of the calculation periods (I think at least?).

Can anyone tell me what changes have been made to SMI4 from the most basic rudimentary basic SMI indicator?

I've attached similar timeframes of the same shot comparing the two indicators (keep in mind these platforms calculate range bars slightly differently and they are from different data feeds so they won't be 100%).

Daedalus,

If i remember correctly, I took a modified version of SMI2 that Cory had done awhile back and, at the time, was calling SMI_MultiColor. It had the SMI, SMIEMA and a differential histogram. I believe it's been reposted to the download section and simply called SMI2. What I did was to swap a couple of plots inside (SMI / Histogram) so that the Histogram became the SMI and the SMI became the histogram, then converted the histogram from bar to dot. I was just playing around with indicator code, having some fun. I liked the way that it looked - similar to an ergodic oscillator. I created a couple of versions (didn't like SMI3), liked SMI4 better, added background coloring so that when the SMIEMA is ABOVE '0', it paints the background blue & if it's below '0' - red, indicating trend direction, added sounds, vertical lines, arrows, etc. etc. That's about it. Nothing special.

For what you want to do, you could use the basic SMI or Cory's SMI2. I believe the code for the SMI2 (minus the histogram plots) is identical to the SMI. Standard Stochastic Momentum Index calculation as proposed by William Blau.

Here's a comment from the SMI indicator, if it helps:

Author: Mathew Wyatt (mathew.wyatt at gmail.com)
// This indicator is the Stochastic Momentum Index by William Blau. Formula for the indicator was found - Re: Bill Blau's formulas, MetaStock Email Archive | PureBytes.Com.

After all, it's what you learn AFTER you know it all, that counts!
Reply With Quote
Thanked by:




Last Updated on May 23, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts