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

How to draw a dot on midpoint of a bar?

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

    How to draw a dot on midpoint of a bar?

    Newbie here.

    How do I draw a dot in the middle of the range of a body in a a candlestick if a condition is true? Re sizable if possible.Actually a code snippet would suffice...

    Thanks!

    #2
    Hello Bud_Fox,

    Thank you for your post.

    In NinjaTrader 7:
    Code:
    DrawDot("Mid"+CurrentBar, false, 0, Low[0]+((High[0]-Low[0])/2), Color.Yellow);
    In NinjaTrader 8:
    Code:
    Draw.Dot(this, "Mid"+CurrentBar, false, 0, Low[0]+((High[0]-Low[0])/2), Brushes.Yellow);

    Comment


      #3
      EDIT: Nevermind! I found the candle quarters indicator that can do this. Just change the type to hash and make all the other settings transparent. Got it here: https://ninjatraderecosystem.com/use...le-quarters-2/
      Can someone please convert this from a dot to a line for Ninja8? I tried but getting compile errors.... Thanks!
      Last edited by TradeUP1; 04-20-2024, 02:19 PM.

      Comment


        #4
        Hello TradeUP1,

        Thanks for your post.

        In NinjaTrader 8, the Draw.Dot() method would be used to draw a dot on the chart as noted by NinjaTrader_PatrickH in post # 2.

        Draw.Dot() Help Guide: https://ninjatrader.com/support/help...8/draw_dot.htm

        Are you referring to the Candle Quarters indicator from the User App Share page linked below?

        Candle Quarters: https://ninjatraderecosystem.com/use...le-quarters-2/

        This script uses Plots to plot values on the charts and does not use Draw methods.

        You could change the PlotStyle of the AddPlot() methods to use PlotStyle.Hash to see a small line drawn at each plotted value.

        For example: AddPlot(new Stroke(Brushes.Gold, 2), PlotStyle.Hash, "BarPivot");

        If you want to see a continuous line for the plot, you could use PlotStyle.Line.

        See this help guide page for more information about AddPlot(): https://ninjatrader.com/support/help...t8/addplot.htm

        Note the script could be modified in the NinjaScript Editor window (New > NinjaScript Editor)


        The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
        Last edited by NinjaTrader_BrandonH; 04-21-2024, 02:54 PM.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Segwin, 05-07-2018, 02:15 PM
        14 responses
        1,789 views
        0 likes
        Last Post aligator  
        Started by Jimmyk, 01-26-2018, 05:19 AM
        6 responses
        838 views
        0 likes
        Last Post emuns
        by emuns
         
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,294 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        13 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        11 responses
        63 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X