Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Dot

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

    Draw Dot

    Hello,
    Is there a way to make it so the...Color.Red...in this code can be made to be user definable...to choose any color you want when in the indicator settings portion of this indicator.

    // Paints a red dot on the current bar 1 tick below the low
    DrawDot("tag1", true, 0, Low[0] - TickSize, Color.Red);

    Thanks

    #2
    Originally posted by dwalls View Post
    Hello,
    Is there a way to make it so the...Color.Red...in this code can be made to be user definable...to choose any color you want when in the indicator settings portion of this indicator.

    // Paints a red dot on the current bar 1 tick below the low
    DrawDot("tag1", true, 0, Low[0] - TickSize, Color.Red);

    Thanks
    yes it's possible.
    create private Color myColor field, create public property for it and don't forget to serialize...

    Comment


      #3
      Thanks roonius, here is the tip for this topic - http://www.ninjatrader-support2.com/...ead.php?t=4977

      Comment


        #4
        Thanks for the help.

        After adding in the private Color borderColor and private Color fillColor fields and also adding them under Properties, I get this error message: No overload for method 'DrawDot' takes '6' arguments CS1501 - click for info 84 5

        DrawDot(
        "Up Dot" + CurrentBar,false, 0, SMA(trendperiod)[0], BorderColor, FillColor);

        I used this as an guide/example from the SampleColorInput:
        DrawRectangle("rectangle", 0, High[0], 5, Low[5], BorderColor, FillColor, 10);


        Any ideas?

        Thanks

        Comment


          #5
          Hi, please use this overload for the DrawDot - DrawDot(string tag, bool autoScale, int barsAgo, double y, Color color)

          There is only one color input for DrawDot, not two.

          Comment


            #6
            Ok, I got it now.

            Thanks for your help.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            156 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            90 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            138 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            130 views
            1 like
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            107 views
            0 likes
            Last Post CarlTrading  
            Working...
            X