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 bortz, 11-06-2023, 08:04 AM
    47 responses
    1,607 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    9 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    19 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    6 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    16 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X