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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    65 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    41 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    23 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    26 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    52 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X