Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Detect Arrow in Chart

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

    How to Detect Arrow in Chart

    Hi

    I am using third arty indicator and it plots Up/Down Arrow for Buy/Sell signals. I want to know how to code in order to detect Up/Down Arrows being drawn and exeute the relevant strategy? thx in advance

    #2
    Hi NingNing,

    With NinjaTrader 7, you can access drawing objects with IDrawObject:


    Aside from that, there is no explicit way of accessing/detecting an arrow. Instead, you will need to copy the same condition the indicator uses, and make executions based on that.
    TimNinjaTrader Customer Service

    Comment


      #3
      is there something similar available for 6.5V?

      Comment


        #4
        Hi kevinlouie,

        Unfortunately not, in that case you would want to use the same conditions/logic the indicator uses. As an alternative, you can add a plot to the indicator, for example setting it to a value of 1 when the arrow conditions are true, and base your conditions on the plot value of the indicator.
        TimNinjaTrader Customer Service

        Comment


          #5
          do you have a sample of it to share or from other thread?

          Comment


            #6
            Hi kevinlouie,

            Unfortunately not, however, lets say the condition in the indicator, "Indicator1", for the arrow is....
            Code:
            if (Close[0] > Close[1])
            {
            DrawArrowUp(....)
            }
            you could create a plot, (with the necessary code in Initialize() and Properties), then add it to the condition...
            Code:
            if (Close[0] > Close[1])
            {
            DrawArrowUp(....)
            Plot1.Set(1);
            }
            else
            {
            Plot1.Set(0);
            }
            then access the code from your strategy...
            Code:
            if (Indicator1().Plot1[0] ==0)
            {
            EnterLong();
            }
            TimNinjaTrader Customer Service

            Comment


              #7
              Plot Detection

              So if a third party indicator plots a black line width 3 on the price panel there is no way to detect this new plot via ninjacript? I do not have access to the indicator code, but simply want to detect new drawing objects that appear on the price panel.

              Regards

              Comment


                #8
                Hi everington_f,

                It's generally recommend that developers send logic along with the drawing objects, as in my example, like a bool, or explicit plot value.

                You may be able to do something like:
                if (Indicator1().Plot1[0] >0)
                do something;
                TimNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NingNing View Post
                  Hi

                  I am using third arty indicator and it plots Up/Down Arrow for Buy/Sell signals. I want to know how to code in order to detect Up/Down Arrows being drawn and exeute the relevant strategy? thx in advance
                  You will have to iterate through the DrawObjects collection, and act on the relevant arrow.

                  ref: http://www.ninjatrader.com/support/h...rawobjects.htm

                  Comment


                    #10
                    Originally posted by NinjaTrader_Tim View Post
                    ... You may be able to do something like:
                    if (Indicator1().Plot1[0] >0)
                    do something;
                    That only works if the developer has not set the ChartOnly property.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    637 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    366 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    107 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    569 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    571 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X