NexusFi: Find Your Edge


Home Menu

 





SMI Indicator for TradeStation


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one cbritton with 1 posts (2 thanks)
    2. looks_two vvbit with 1 posts (4 thanks)
    3. looks_3 Todd with 1 posts (0 thanks)
    4. looks_4 Serger with 1 posts (0 thanks)
    1. trending_up 12,453 views
    2. thumb_up 6 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 1 attachments




 
Search this Thread

SMI Indicator for TradeStation

  #1 (permalink)
 
Todd's Avatar
 Todd 
Alpharetta, GA
 
Experience: Intermediate
Platform: ninja
Broker: Mirus / Zenfire
Trading: ES
Posts: 234 since Jun 2009
Thanks Given: 28
Thanks Received: 40

Hi,

I contributed the SMI2New Indicator to the forum months ago and lots of people seem to be using it, which is awesome! I had taken the SMI indicator from Tradestation forums and had hired a programmer to transfer the easy language code to ninjascript then make improvements to it (added the SMIema crossover line, added paintbars, added alerts)

Now, I could you some help. Could someone who knows Ninja and TradeStation please take the current SMI2New indicator (attached below) and and duplicate this back into TradeStation easy language? I don't need any alerts but I'd like an SMI with SMIema and I'd very much like the paintbars in TradeStation.

Sometimes I need to use my TradeStation account to trade and it would help to have this same tool that I use in Ninja back in TS.

I don't know enough about programming to know if this is a big request or a small request. Any help with this is appreciated.

Thanks,
Todd

Attached Files
Elite Membership required to download: SMI2.cs
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
Quant vue
Trading Reviews and Vendors
Trade idea based off three indicators.
Traders Hideout
 
  #2 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256

try this:

 
Code

inputs: Rng(13), EMAPd1(25), EMAPd2(1), SMIEMAPd(25), alertlevel(40);

var: sms(0), hls(0), denom(0.0), smis(0), smiema(0)
;

Plot1(close, "Rising SMI");
Plot2(close, "Falling SMI");
noplot(1);
noplot(2);

if CurrentBar >= EMAPd1 and CurrentBar >= EMAPd2 then begin

    sms = Close[0] - 0.5 * ((Highest(High, range) + lowest(Low, range)));
            
    //High low diffs
    hls = highest(High, range) - Lowest(Low, range);

    //Stochastic Momentum Index = SMI
    denom = 0.5*XAverage(XAverage(hls,emapd1),emapd2);
    value1 = iff(denom = 0, 1, denom);
     smis = 100*XAverage(XAverage(sms,emapd1),emapd2) / value1;
        
    //Set the line value for the SMIEMA by taking the EMA of the SMI
    smiema = XAverage(smis, smiemapd);

    value2 = iff(smis > smis[1], GetPlotColor(1), GetPlotColor(2));
    condition1 = smis crosses below smiema;
    condition2 = smis crosses above smiema;
    
    Plot3(smis, "SMI", value2);
    Plot4(smiema, "SMIEMA");
    
    if condition1 then begin
        // alert
        alert("SMI crosses above signal line");
    end else if condition2 then begin
        // alert
        alert("SMI crosses below signal line");
    end;
end;

Plot5(alertlevel, "Alert");
Plot6(-alertlevel, "Alert");
If you have NT, compare this with a daily chart of something. Let me know if they don't match and I'll fix it.

Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
Thanked by:
  #3 (permalink)
 
Serger's Avatar
 Serger 
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: Interactive Brokers
Trading: Ym, Es
Posts: 74 since Oct 2010
Thanks Given: 64
Thanks Received: 25


Hello all,
long time ago i lesten ..good smi, but never use it , how you use it ?
do you post a graph ...
thank you so much
Serger

Reply With Quote
  #4 (permalink)
vvbit
Honolulu
 
Posts: 1 since Nov 2015
Thanks Given: 1
Thanks Received: 1


cbritton View Post
try this:

Thanks, Cbritton! it's a useful code.
Please see updated version below, I fixed input Rng issue as it was not used in the code (there was "range" instead).
And I fixed wrong Alerts order
 
Code
// www bigmiketrading com/tradestation/654-smi-stochastic-momentum-index-indicator-tradestation.html
{STOCHASTIC MOMENTUM INDEX from William Blau  
}  
inputs: Rng(13), EMAPd1(25), EMAPd2(1), SMIEMAPd(25), alertlevel(40);

var: sms(0), hls(0), denom(0.0), smis(0), smiema(0);

Plot91(close, "Rising SMI");   noplot(91);
Plot92(close, "Falling SMI");  noplot(92);

if CurrentBar >= EMAPd1 and CurrentBar >= EMAPd2 then begin

    sms = Close[0] - 0.5 * ((Highest(High, Rng) + lowest(Low, Rng)));
            
    //High low diffs
    hls = highest(High, Rng) - Lowest(Low, Rng);

    //Stochastic Momentum Index = SMI
    denom = 0.5*XAverage(XAverage(hls,emapd1),emapd2);
    value1 = iff(denom = 0, 1, denom);
     smis = 100*XAverage(XAverage(sms,emapd1),emapd2) / value1;
        
    //Set the line value for the SMIEMA by taking the EMA of the SMI
    smiema = XAverage(smis, smiemapd);

    value2 = iff(smis > smis[1], GetPlotColor(91), GetPlotColor(92));
    
    Plot3(smis, "SMI", value2);
    Plot4(smiema, "SMIEMA");
    
    // alert
    if smis crosses above smiema then begin
        alert("SMI crosses above signal line");
    end else if smis crosses below smiema then begin
        alert("SMI crosses below signal line");
    end;
end;

Plot5(alertlevel, "Alert");
Plot6(-alertlevel, "Alert");

Reply With Quote




Last Updated on November 10, 2015


© 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