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 andrewtrades, Today, 04:57 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    6 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    8 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X