Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategies and drawing objects

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

    Strategies and drawing objects

    Hello,

    Can a strategy create a drawing object?

    I am trying to draw a ray within a strategy and it is not showing up on the chart.

    I realize a strategy does not need a chart to be open, but if there is one open, can it create a drawing object?

    If not, is there a technique to have a strategy tell a indicator to draw the object?

    Thanks

    #2
    Hi Turtle Trader,

    Yes, this is certainly possible.

    For example, by applying a strategy to a chart with...

    DrawRay("Ray1",10, Close[0], 5, Close[0], Color.Blue);

    Are you receiving any errors in the log tab of the Control Center?
    Can you post the code snippet that you are using?
    TimNinjaTrader Customer Service

    Comment


      #3
      reply

      The missing piece: How do I attach a strategy to a chart?

      Comment


        #4
        Hi Turtle Trader,

        You can right click and select "Strategies...".
        TimNinjaTrader Customer Service

        Comment


          #5
          reply

          I have the strategy running but the chart has "Strategy" greyed out. Cannot select it.

          I am trying to test this with Replay Data....

          Comment


            #6
            Turtle Trader,

            You will need to be connected to your replay first. Then please be sure that the Chart Trader is not on.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              more questions

              1) can a strategy be aware if I manually move one of the lines it creates
              2) would it know the new coordinates of a line that was moved manually?
              3) can it create more than one line and distinguish between them?
              4) can it delete lines it has created?

              Thanks

              If yet, can you please point me to the correct references?

              Comment


                #8
                Hi Turtle Trader,

                1. With NinjaTrader 6.5, you were limited in that you cannot move a line that a strategy creates. With version 7, you can, however...

                More info at - http://www.ninjatrader.com/support/h...drawobject.htm


                2. You can collect that information.

                More info at - http://www.ninjatrader.com/support/h...drawobject.htm

                3. You can create multiple lines by changing the tag name, for example...

                "Line" + CurrentBar

                4. You can remove lines with RemoveDrawObject()

                More info at - http://www.ninjatrader-support.com/H...moveDrawObject
                TimNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                650 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                370 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                109 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                574 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                577 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X