Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      26 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      32 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 04-23-2024, 09:53 PM
      2 responses
      49 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      193 views
      0 likes
      Last Post Hasadafa  
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,235 views
      0 likes
      Last Post xiinteractive  
      Working...
      X