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 AaronKoRn, Yesterday, 09:49 PM
      0 responses
      11 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      10 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      12 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,982 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Yesterday, 06:48 PM
      0 responses
      10 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X