Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NEED Help For Code

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

    NEED Help For Code

    How do I Code The Following

    If High < SMA200 and SMA200 < SMA200 20 days ago

    #2
    Hi Frasva, welcome to the NinjaTrader support forums!

    Are you looking for an indicator or strategy?

    For our custom indicator tutorials, you can check here - http://www.ninjatrader-support.com/H...verview18.html

    You can also use the Strategy Wizard approach to generate code without the need for programming - http://www.ninjatrader-support.com/H...rdScreens.html

    If you need your ideas professionally programmed, please check out those NinjaScript consultants - http://www.ninjatrader.com/webnew/pa...injaScript.htm

    Comment


      #3
      Originally posted by Frasva View Post
      How do I Code The Following

      If High < SMA200 and SMA200 < SMA200 20 days ago
      if(CurrentBar < 20) return;

      if(High[0] < SMA(200)[0] && SMA(200)[0] < SMA(200)[20])
      {
      // Do your stuff
      }

      Comment


        #4
        roonius

        Thanks Roonius
        Very nice of you to use your time on this answear

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        571 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        331 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        549 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        550 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X