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 geddyisodin, Yesterday, 05:20 AM
            8 responses
            51 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            10 responses
            36 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by DayTradingDEMON, Today, 09:28 AM
            4 responses
            24 views
            0 likes
            Last Post DayTradingDEMON  
            Started by George21, Today, 10:07 AM
            1 response
            17 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by Stanfillirenfro, Today, 07:23 AM
            9 responses
            25 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X