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

Global Draw Objects

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

    Global Draw Objects

    After creating a Ray like so:

    Code:
    Ray longMA = Draw.Ray(this,"200 SMA",10,SMA(Close,200)[0],0,SMA(Close,200)
    [0],Brushes.RoyalBlue);
    How can I set it as a global object?

    #2
    Hello ,

    Thanks for your post.

    You would need to use the Draw.Ray() method overload with the IsGlobal bool set to true. Here is one overload: Draw.Ray(NinjaScriptBase owner, string tag, int startBarsAgo, double startY, int endBarsAgo, double endY, bool isGlobal, string templateName) Note that to use the global mode you would need an existing ray drawing template with the ray characteristics (Color, width, line type) predefined or use the system default by using an empty string for the template name.

    Reference: http://ninjatrader.com/support/helpG.../?draw_ray.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Paul, I am aware of that overload. However, I don't want to have to specify a template when creating the object. Is there a way to alter the global status after creation?

      Comment


        #4
        Hello drmartell,

        Thanks for your reply.

        It does not appear possible.

        I will write a feature to add this capability in the manner you are asking for. I will update this thread when I have further information.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thank you,

          It does appear that the Ray is drawn as global by default, but I am accustomed to being able to change this and other properties like in NT7. So, +1 on the feature request.

          Comment


            #6
            Hello drmartell,

            Thanks for your reply.

            The feature request has been assigned as SFT-948, "Allow drawing objects to be set to "Global" via NS "

            Thank-you for your suggestion.


            Edit: 3/28/17 12:16 - Changed SFT number for one that covers all draw objects global status.
            Last edited by NinjaTrader_PaulH; 03-28-2017, 12:18 PM.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Paul View Post
              The feature request has been assigned as SFT-2093, "Allow Draw.Ray set to Global via NS".
              Hey Paul, if you would be so kind as to either modify the existing SFT and/or add an additional one, that

              Allows changing of Any DrawObjects (manual or script) Global setting via NS...

              This really applies to all drawobjects, not just the ray...


              Thanks


              -=Edge=-
              NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

              Comment


                #8
                Hi -=Edge=-,

                Thanks for adding in.

                I've dug into the feature requests and found that one already exists that covers all draw objects. it is SFT-948, "Allow drawing objects to be set to "Global" via NS". We will add your vote for this.

                drmartell - Will remove the SFT for just the draw ray and add your vote to SFT-948. (I will change my post below to show SFT-948.

                Thanks again for your suggestions and interest in improving NinjaTrader8.

                Edit, changed ns objects to draw objects in first line.
                Last edited by NinjaTrader_PaulH; 03-28-2017, 12:23 PM.
                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by judysamnt7, 03-13-2023, 09:11 AM
                4 responses
                57 views
                0 likes
                Last Post DynamicTest  
                Started by ScottWalsh, Today, 06:52 PM
                4 responses
                36 views
                0 likes
                Last Post ScottWalsh  
                Started by olisav57, Today, 07:39 PM
                0 responses
                7 views
                0 likes
                Last Post olisav57  
                Started by trilliantrader, Today, 03:01 PM
                2 responses
                19 views
                0 likes
                Last Post helpwanted  
                Started by cre8able, Today, 07:24 PM
                0 responses
                9 views
                0 likes
                Last Post cre8able  
                Working...
                X