Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New Programmer, Plotting highs and lows

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

    New Programmer, Plotting highs and lows

    I an new to coding and looking for the best way to plot highs and lows on an intraday chart.

    Is something like this OK


    if (HighestBar(DefaultInput, 30))
    {
    DrawDot("My dot" + CurrentBar, false, 0, 0, Color.Blue);
    }


    Thanks for any help.

    #2
    Hello,

    The code here is not incorrect but it might not be exactly what you want.

    The above will take the default input (typically this will be the closing price unless modified by the user) and find the largest value over the pats 30 bars. When it finds this it will draw a dot. Currently you're drawing dots at 0 on the Y axis so you'll likely want to change this so that it shows in the visible region.

    I think you'll also find that there are indicators out there that might already do what you're looking for.

    This isn't the best indicator to start out with if you're just learning but consider taking a look at the CurrentDayOHL indicator that comes installed with NinjaTrader (tools -> edit NinjaScript -> indicator -> CurrentDayOHL)

    We also have classes for learning NinjaScript here: http://www.ninjatrader.com/PremiumEducation.php
    If you have questions about these classes please send them into suppor at ninjatrader dot com

    Let me know if I can further assist.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Course looks great, just booked it.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      579 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 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
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X