Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EasyLanguage to NinjaScript

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

    #16
    I can use Print ( DrawObjects["TL11"].DrawType.ToString() ) ;
    ok,
    but how do I get the other parameters from just the tag ?

    Comment


      #17
      What I am trying to do is change the color and style of my lines from the tags only, TL10 - TL99

      Comment


        #18
        Hello RobinT,

        Thank you for your patience.
        Originally posted by RobinT View Post
        I am looking for a Horizontal line from a start point and extends right as time progresses. I can use:

        Drawline (

        and set the endtime to DateTime.Now on every bar

        is there a way of using DrawExtendedLine ( and have it not extend left as I dont want that.

        would I be correct in thinking a Ray does what I want and when I am finished with the line I can convert it into a Drawline (). It says a ray extend in one direction, but it doesn't say which direction.
        I would not use DrawExtendedLine or DrawRay for this. I am wondering if a simple negative barsAgo value would not be what you are looking for. For example:
        Code:
        DrawLine("tag", 2, Close[0], -2, Close[0], Color.Black);
        Originally posted by RobinT View Post
        I have a number of Rays, each with its own unique tag, "TL01", "TL99" etc. Once these are plotted how do I get and change the parameters using the tag. I want to get the Startdate and I want to change the color.
        You would need to cycle through the DrawObjects on the chart, please refer to the information at the following link: http://ninjatrader.com/support/helpG...drawobject.htm
        Originally posted by RobinT View Post
        also if I have multiple charts, how do I get data from multiple data streams.
        Are you asking how to get the drawing objects from multiple charts or the price values from multiple charts? You will need to expand upon your inquiry further so that I may understand.
        Originally posted by RobinT View Post
        Where can I find a list of programmable properties like:

        HorizontalGridLines = false;
        Please visit the following link: http://ninjatrader.com/support/helpG.../indicator.htm

        Comment


          #19
          You would need to cycle through the DrawObjects on the chart, please refer to the information at the following link: http://ninjatrader.com/support/helpG...drawobject.htm

          I want to cycle through some (not all) of the objects and I want to know how to get to the object via the tag.

          Are you asking how to get the drawing objects from multiple charts or the price values from multiple charts? You will need to expand upon your inquiry further so that I may understand.

          I have a chart with two panels and an instrument in each panel. The indicator gets data from panel 1, how do I get data from panel 2?

          Please visit the following link: http://ninjatrader.com/support/helpG.../indicator.htm[/QUOTE]

          That does not help me with the chart parameters like backgound color.

          Comment


            #20
            I am still not getting any data from Tradestation for $ symbols like $spx.x or $vix.x

            futures ok.

            Comment


              #21
              Suppose I find my line using:
              foreach (IDrawObject draw in DrawObjects )
              {
              if (draw.DrawType.ToString() == "Ray" & draw.Tag == "TL81" )
              {Print (draw.Tag + " " + draw.DrawType ) ; }
              }
              How do I change the parameters or get them from draw ?

              Comment


                #22
                Hello RobinT,

                You will use the IObjectName instead. Like IRay: http://ninjatrader.com/support/helpGuides/nt7/iray.htm

                BackColor is what you need for the background: http://ninjatrader.com/support/helpG.../backcolor.htm

                You need to review the NinjaScript documentation: http://ninjatrader.com/support/helpG..._reference.htm

                For the TradeStation symbols, can you please confirm you followed the directions at the following link?

                Comment


                  #23
                  You will use the IObjectName instead. Like IRay: http://ninjatrader.com/support/helpGuides/nt7/iray.htm

                  I will give that a go.

                  BackColor is what you need for the background: http://ninjatrader.com/support/helpG.../backcolor.htm

                  Thanks.

                  You need to review the NinjaScript documentation: http://ninjatrader.com/support/helpG..._reference.htm

                  ok.

                  For the TradeStation symbols, can you please confirm you followed the directions at the following link?[/QUOTE]

                  yes, esh16 is working fine into ES 03-16 but $spx.x is not working into ^SP500

                  Comment


                    #24
                    It wont let me get the Rays

                    IRay ray = draw ;

                    Comment


                      #25
                      I can't believe this simple ts app is so difficult.

                      I draw some lines in the day and at the eod i just want to change their color and style.

                      have I chosen the wrong platform ?

                      Comment


                        #26
                        I scoured the documentation and I can't see how to get a second dataseries from panel 2. In TS it's data2.

                        Comment


                          #27
                          RobinT,

                          I would try to tackle one item at a time. If you would like to tackle the code first please provide the full .cs file you are using and define what you wish to do in your response.

                          For the TradeStation symbols please write to platformsupport[at]ninjatrader[dot]com to set up a remote session.

                          Comment


                            #28
                            I got mutli instruments working so lets tackle drawing objects

                            Comment


                              #29
                              This is a huge program already, you will never find your way around.

                              It simply creates a load of Rays with

                              IRay ray = DrawRay(tl_tag, false, dt_tl, tgtval, DateTime.Now , tgtval, tl_col, DashStyle.Dot , 2) ; }
                              else
                              ILine line = DrawLine(tl_tag, false, dt_tl, tgtval, dt_ed , tgtval, tl_col, DashStyle.Dot , 2) ; }

                              Then it tries to get them later with:

                              foreach (IDrawObject draw in DrawObjects )
                              {
                              if (draw.DrawType.ToString() == "Ray" )
                              { //IRay ray = draw ;
                              Print (date.ToString() + " " + time.ToString() + " " + draw.Tag + " " + draw.DrawType ) ; }
                              }

                              but I cant seem to get the parameters into an accessible object. I want to change the color and style.

                              I have text objects in there as well.
                              }

                              Comment


                                #30
                                RobinT,

                                You would have to assign a IRay to every Ray you draw and then call them solely by their IRay object name given. You would not set them to IDrawObject.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                605 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                351 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
                                560 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                561 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X