Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Questions on drawing from a strategy

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

    Questions on drawing from a strategy

    I have a few questions on drawing from a strategy.

    1) Can I adjust the size of a dot or an arrow drawn using a statement such as:
    DrawArrowUp("DivUp", 1, Lows[0][1] - TickSize, Color.Green);

    2) I can't find the method for coloring a bar. What is it?

    3) Is there a way to keep previous arrows (etc.) on the chart if I keep using the same draw statement? If not, is there another way?

    Thanks,

    Folls

    #2
    Hi,

    1) Unfortunately chart marker sizes are non-adjustable

    2) See this link - http://www.ninjatrader-support.com/H.../BarColor.html

    3) No, if you remove a strategy from a chart, any draw objects will be removed
    RayNinjaTrader Customer Service

    Comment


      #3
      To be able to keep a reasonable number of markers on the chart, I used the following code:

      drawCounter += 1; //update draw counter
      if (drawCounter > 1000) drawCounter = 0; // keep the counter small
      string counter = drawCounter.ToString("n0"); //convert to string

      // draw an indication
      DrawArrowUp(counter, 1, Lows[0][1] - TickSize, Color.Green);

      I got the attached error when I installed the strategy on the chart. Prior to using the drawCounter, I was reusing a DrawArrowUp statement and thus only keeping the last marker on the chart. That did not get an error.

      Any advice or input?

      Thanks!

      Folls
      Attached Files

      Comment


        #4
        This is a rare bug that does not seem to have negative implications. We are having a hard time reproducing it. We did add some code that hopefully works around this for the next update.

        Does this happen each time you run this strategy or did it only happen once?

        It is not related to your code changes.
        RayNinjaTrader Customer Service

        Comment


          #5
          It seems repeatable. Every time I have installed the strategy, it has happened. Like you said, it doesn't seem to cause a problem.

          Folls

          Comment


            #6
            For clarification. Could you cycle through several times, appying the strategy, removing, applying removing and let us know if the error message happens each time? If yes, I would request from you some files for us to reproduce here.

            Thanks
            RayNinjaTrader Customer Service

            Comment


              #7
              It does it every time I put the strategy in the chart.

              Comment


                #8
                I sent you a PM.
                RayNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                630 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                364 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                564 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                568 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X