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 ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rajendrasubedi2023, Today, 09:50 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by geotrades1, Today, 10:02 AM
        0 responses
        4 views
        0 likes
        Last Post geotrades1  
        Started by bmartz, Today, 09:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X