Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SMA Scanner

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SMA Scanner

    Hello,
    I am very new to NT and looking at creating a very simple scanner to detect the breakout
    trend using SMA, and copied below is the plan

    1) Will run on a daily chart
    2) I have ~ 500 stocks under Instrument list called "NSE"
    3) I have created an SMA where Period is 25 days and Visual> Displacement is 5 days

    I want this scanner to identify any trade the moment it closes above or below the SMA.

    Any help on this will be much appreciated.

    Thanks
    Ravi

    #2
    Hello Ravi,

    Thank you for your patience and welcome to the NinjaTrader Support Forum!

    You could create this as a strategy or indicator that you apply to each of the instruments. You can create automated strategies and indicators in NinjaTrader through NinjaScript.

    An example is the following:
    Code:
    			double sma25 = SMA(25)[4];
                if (CrossAbove(Close, sma25, 1))
    			{
    				// EnterLong();
    			}
    			if (CrossBelow(Close, sma25, 1))
    			{
    				// EnterShort();
    			}
    For information on NinjaScript please visit the following link: http://ninjatrader.com/support/helpG..._resources.htm
    For videos on NinjaScript please visit the following link: https://www.youtube.com/user/NinjaTr...ry=NinjaScript

    Please let me know if you have any questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    31 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, Yesterday, 02:41 AM
    0 responses
    14 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    22 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    34 views
    0 likes
    Last Post CarlTrading  
    Working...
    X