Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator DrawHorizontalLine to Attach: to ALL Charts

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

    Indicator DrawHorizontalLine to Attach: to ALL Charts

    Hello

    I have developed an indicator that uses Ninjascript method DrawHorizontalLine(string tag, bool autoScale, double y, Color color, DashStyle dashStyle, int width) to draw levels on the chart.

    What I need to know is if there is a setting I can use so that the levels drawn on a chart are "Attached to all charts" for the same instrument automatically from withing the script.

    Therefore the levels drawn by the indicator will appear on multiple charts for the same instrument. The same way as if I drew an ellipse, by hand, on one chart and set it's "Attach to all charts" using the ellipse properties dialog box.

    Is there such a setting or is there a particular why of naming the "string tag" of the DrawHorizontalLine(...) Object ?

    Please let me know.

    Thanks in advance.

    #2
    Hello Lucius,

    This would unfortunately not be possible for a NinjaScript generated drawing object, it's however on our feedback list in product management and actively tracked as potential enhancement for our next major release of the platform. I just added a vote on your behalf in as well to this item.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I am having an issue with the Attach all function for drawing extended lines on multiple charts of the same instrument. I have 4 charts of different timeframes and they are all linked. When I draw the line it sometimes shows up on one other chart and sometimes on three of four. Is this just a glitch? If I change the time frame (For example, changing the daily chart to a weekly chart to draw a line and then switch it back to a daily to draw a line on that chart) should those lines propagate on all charts linked together? I tried reloading all the charts, linking them with a different color, restarting ninjatrader and the problem is still there.

      Comment


        #4
        Hi JRCibula,

        It may be that the one of the points of the line are off of the chart and the line is not appearing.

        What is the interval of the chart with the line?

        What is the start and end time and price of the line?

        What is the interval of the chart not showing the line?

        What is the first visible bar time and last visible bar time on the chart not showing the line?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          What is the interval of the chart with the line?

          - I drew a trend line on the weekly chart that will not show up on the 15 min or 500 volume chart I have.
          -A drew a horizontal line on a daily chart and 240 minute chart at price of 482.50. Neither will show up on the 15 minute chart or the 500 volume chart

          What is the start and end time and price of the line?
          All lines are extended lines so they should cover all times

          What is the interval of the chart not showing the line?
          -the 15 minute and 500 volume chart won't show the lines drawn on the higher time frame charts.
          -I just drew a line on the 500 volume chart and it only showed up on the 15 minute chart.

          What is the first visible bar time and last visible bar time on the chart not showing the line?

          -The 15 minute chart shows from midnight to noon at the moment. But again all lines drawn are extended lines.

          Comment


            #6
            Hi JRCibula,

            Extended lines have two points.

            You can view these points by right-clicking the line, select Properties..., select the Data tab.

            I'm looking for Start Time:, Start Y:, End Time:, and End Y:.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thanks I redrew the line clicking on the last known price and they showed up on all the charts. So I can't count on the Extended line to be infinitely continuous? All the lines are showing up on the chart now that I am clicking on the current price to be the end point.
              Last edited by JRCibula; 05-07-2014, 12:15 PM.

              Comment


                #8
                Hi JRCibula,

                Extended lines have two price points. This means that if one of the price points is more than a few bars outside of the chart, the line will not show.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hallo,

                  is it possible to access Lines created in a strategy with DrawHorizontalLine in the chart by the mouse where the strategy is running and change its position ?

                  Thank You

                  Rolf Theus

                  Comment


                    #10
                    Hi RolfTheus,

                    A line that is manually drawn on a chart cannot be modified by code.
                    (You can find it, and return the anchor points from it, but you cannot modify it)
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_ChelseaB View Post
                      Hi RolfTheus,

                      A line that is manually drawn on a chart cannot be modified by code.
                      (You can find it, and return the anchor points from it, but you cannot modify it)
                      and visa versa ? created in code an manipulating in the chart by mouse?

                      Thank You
                      Rolf Theus

                      Comment


                        #12
                        Hi RolfTheus,

                        The inverse is actually possible.

                        You can manually modify a drawing object that is drawn by code.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by RolfTheus View Post
                          and visa versa ? created in code an manipulating in the chart by mouse?

                          Thank You
                          Rolf Theus
                          Yes, until you reload the chart, at any event.

                          Comment


                            #14
                            Originally posted by koganam View Post
                            Yes, until you reload the chart, at any event.
                            My Problem:

                            I want to create Lines in the chart by my strategy. Then I want to modify this lines by hand because the new positions in the chart are meaningful for the strategy. The strategy reads the new positions and acts on them.

                            But i cannot change the positions of the lines by mouse, because they are created by the strategy and not from me by hand in the chart.

                            What is the code or c# function to reload a chart in the strategie on every event ?

                            Thank You
                            Rolf Theus
                            Last edited by RolfTheus; 07-25-2014, 11:31 PM.

                            Comment


                              #15
                              Originally posted by RolfTheus View Post
                              My Problem:

                              I want to create Lines in the chart by my strategy. Then I want to modify this lines by hand because the new positions in the chart are meaningful for the strategy. The strategy reads the new positions and acts on them.

                              But i cannot change the positions of the lines by mouse, because they are created by the strategy and not from me by hand in the chart.

                              What is the code or c# function to reload a chart in the strategie on every event ?

                              Thank You
                              Rolf Theus
                              That you should be able to do, because you can adjust strategy drawn object, and query their then newly current properties. However, automated trading was not designed to be an interactive experience, so your adjustments will not be stored. Actually, those adjustments cannot be stored in this iteration of the software. When you reload the chart, NT will interpret the historical price data stream afresh and redraw any objects, per the original drawing instructions. The result will be that any and all drawn objects will be redrawn in their original position, pre your manual adjustment.

                              Of course, this being just C# after all, if you want to, you can always write the drawing object(s) properties to file, and read back that file to get the data to restore your objects to their last state. It is just a matter of how deep you want to go, in order to turn what was intended to be a quasi hands-off experience into an interactive experience, with persistent state.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by judysamnt7, 03-13-2023, 09:11 AM
                              4 responses
                              59 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
                              21 views
                              0 likes
                              Last Post helpwanted  
                              Started by cre8able, Today, 07:24 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post cre8able  
                              Working...
                              X