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

Any indicator that plots multiple horizontal lines quickly and easily

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

    Any indicator that plots multiple horizontal lines quickly and easily

    I'm looking for a way to draw multiple horizontal lines quickly and easily.


    If there is an indicator which allows to add a line with price(anchor y), color, opacity, width, dash style and anchor time and so on, I would appreciate for the link.
    Tried to search it but couldn't find it.. It doesn't need have exact features but as long as I can draw lines easily and quickly instead of drawing them one by one, it would be very handy.

    Thanks for your help.

    #2
    Horizontal GridLines?
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    DrawHorizontalGridLines = false; // Horizontal grid lines will not plot on the indicator panel
    AddPlot(Brushes.Orange, "SMA");
    }
    }

    try this link https://ninjatraderecosystem.com/use...nacci-cluster/
    Last edited by Emma1; 12-21-2018, 06:05 PM.

    Comment


      #3
      Emma1, thanks for reply.
      Unfortunately, I have no idea what to do with coding that you shared. No programming knowledge.. sorry. but will definitately check the link.

      Attached the image that explains what I mean.
      I just need to draw multiple lines on the chart but right now I draw them individually (one by one) which takes much time..
      so it would be great if there is an indicator that has features to add line as many as I want and change settings(like color, line type, locked, width, price...) each line separately
      Attached Files

      Comment


        #4
        Unless there is a strategy or trade condition specified about the lines , it can be difficult to say.

        DrawHorizontalLine(string tag, bool autoScale, double y, Color color, DashStyle dashStyle, int width) NT7
        DrawLine("tag1", false, 10, 1000, 0, 1001, Color.LimeGreen, DashStyle.Dot, 2);NT7 ,the tag serves as label.


        https://ninjatrader.com/support/help...of_stop_lo.htm,
        Draw.HorizontalLine() NT8
        Draw.HorizontalLine(NinjaScriptBase owner, string tag, double y, Brush brush, DashStyleHelper dashStyle, int width, bool drawOnPricePanel)



        Last edited by Emma1; 12-21-2018, 09:52 PM.

        Comment


          #5
          Thanks again Emma1,
          It has nothing to do with a strategy, but I watch the price action at or near a line and place a trade manually. They are just support/resistance lines. I'm just lazy to draw them manually since there are many lines to draw and need to do it every day. Just wondering if there is an easier way to do this.

          Comment


            #6
            try this link https://ninjatrader.com/support/help..._tools__ob.htm
            Working with Drawing Tools & Objects

            Comment


              #7

              / Prints the current pivot point value
              double value = Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).PP[0];
              Print("The current Pivots' pivot value is " + value.ToString());



              // Prints the current S2 pivot value
              double value = Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).S2[0];
              Print("The current Pivots' S2 pivot value is " + value.ToString());


              Originally posted by Emma1 View Post
              try this link https://ninjatrader.com/support/help..._tools__ob.htm
              Working with Drawing Tools & Objects

              Comment


                #9
                Hello jjanguda,

                Unfortunately, this would not be something that could be setup in the Alerts window with a point and click interface. To automatically draw objects on a chart does require creating an indicator in code. The Strategy Builder can be very helpful with creating code that can be copied over to an indicator, but this does take some work.
                As a heads up, working with manual inputs does add a layer of complexity. In case you might be thinking about clicking on the chart and generating multiple drawing objects based on one click, or a special drawing object that creates lines based on data in several places with only one click.

                I want to thank the community in this thread for being so helpful. They do have this right in that this would need to be custom coded.

                And I'm happy to assist you if you choose to take on this challenge yourself.

                You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #10
                  Originally posted by jjanguda View Post
                  Attached the image that explains what I mean.
                  From the pic you attached, it looks like most of the lines you are drawing are equidistant from each other..

                  Possibly trying to identify ranges of some type.. (whether that be between highs and lows, every 50 cents, or whatever..)

                  If this happens to be the case.. The default Fibonacci Retracement Drawing Tool can do this rather easily..

                  Here is a video demonstration on how you would set it up for identifying ranges, and/or even use it as a Risk Reward Tool!








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

                  Comment


                    #11
                    Since equidistant lines have limited sense, I'd rather use FIBONACCI pivots. They are exactly the support / resistance lines you look for, moreover they change automatically at any new day (and possibly in realtime too), saving you further work.

                    Comment


                      #12
                      Hello, I am in a similar case.
                      I want to draw line every 50 and 100. Price tend to find support or resistance at these level so it would be interesting to have then on a chart. Is there any way to automate the drawing of these line?

                      Thank you

                      Comment


                        #13
                        Hello elgreco,
                        Simplest is to adjust Horizontal Grid Lines at these levels, right click on price scale -> properties -> horizontal grid lines -> fixed & horizontal grid lines interval type -> points then enter interval value, refer attached screen shot.

                        Comment


                          #14
                          Thanks a lot.

                          Comment


                            #15
                            here is a picture of what I would like to create ... basically I'm looking for a way to create lines based on a reference point. The indicator then paints lines at pre-defined distances (e.g. every 50 ES points a line) with the potential of intermediate lines in between:

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Barry Milan, Yesterday, 10:35 PM
                            6 responses
                            18 views
                            0 likes
                            Last Post Barry Milan  
                            Started by DanielSanMartin, Yesterday, 02:37 PM
                            2 responses
                            13 views
                            0 likes
                            Last Post DanielSanMartin  
                            Started by DJ888, 04-16-2024, 06:09 PM
                            4 responses
                            13 views
                            0 likes
                            Last Post DJ888
                            by DJ888
                             
                            Started by terofs, Today, 04:18 PM
                            0 responses
                            12 views
                            0 likes
                            Last Post terofs
                            by terofs
                             
                            Started by nandhumca, Today, 03:41 PM
                            0 responses
                            8 views
                            0 likes
                            Last Post nandhumca  
                            Working...
                            X