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

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
      BertrandNinjaTrader Customer Service

      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.

          BertrandNinjaTrader Customer Service

          Comment


            #6
            Ok, I got it now.

            Thanks for your help.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by timko, Today, 06:45 AM
            1 response
            7 views
            0 likes
            Last Post gaz0001
            by gaz0001
             
            Started by Waxavi, 04-19-2024, 02:10 AM
            3 responses
            41 views
            0 likes
            Last Post gaz0001
            by gaz0001
             
            Started by Max238, Today, 01:28 AM
            2 responses
            26 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by Shansen, 08-30-2019, 10:18 PM
            25 responses
            949 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by JonesJoker, 04-22-2024, 12:23 PM
            8 responses
            45 views
            0 likes
            Last Post JonesJoker  
            Working...
            X