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

Have to hit F5 refresh

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

    #16
    But if you wish to control the upper and lower margin you need to do it via a custom plot and not in OnBarUpdate.

    Could you describe please, what you try to achieve? The goal is not clear at all. I cannot devine it from the various code snippets.
    Last edited by Harry; 04-22-2015, 03:28 AM.

    Comment


      #17
      Originally posted by Harry View Post
      But if you wish to control the upper and lower margin you need to do it via a custom plot and not in OnBarUpdate.

      Could you describe please, what you try to achieve? The goal is not clear at all. I cannot devine it from the various code snippets.
      I`m trying to achieve just that.to control the upper and lower margin of the Y scale.What additional information you need to compose a prototype of your custom plot?Please,let me know.

      btw,almost all parts already in this thread.

      Sincerely

      Comment


        #18
        You could have a look at the NinjaTrader Heikin-Ashi indicator.

        It comes with a custom plot that scales the chart.

        Comment


          #19
          Too complex for me to figure.It`s like writting a new indicator on top of the old.

          Comment


            #20
            Hello outsource,

            I need to add in that overriding the Plot() is not supported by NinjaTrader to do.

            Also, using ChartControl is not supported by NinjaTrader as well.

            That said, the Plot() method triggers whenever something changes on the chart. If the chart is clicked, moved, a tick is received. Think of this as the OnRender() method.

            This will trigger on a change and will not require that F5 be hit on your keyboard. You can test this by printing outside of any conditions on the first line of the Plot override.

            Also, Close[0] is available to the Plot override (you can test this as well by printing outside of any conditions on the first line of the Plot override).
            Chelsea B.NinjaTrader Customer Service

            Comment


              #21
              Originally posted by NinjaTrader_ChelseaB View Post
              Also, Close[0] is available to the Plot override (you can test this as well by printing outside of any conditions on the first line of the Plot override).
              Even if Close[0] is available to Plot override, it is not at all useful for vertical scaling or anything else. When you are connected to a data feed and scroll back horizontally, Close[0] designs the current bar and not the last bar shown on the chart. When my chart shows a section from March, how can I scale the chart to match the prices by using the Close from April 22 ?

              To adjust the scale based on the close value of the last bar shown on the chart, one would need to access the close value for the last bar index. I have tried Close.Get(this.LastBarIndexPainted), but this does not work: However, it is possible to replicate the Close with a DataSeries object and then access the value as replicatedClose.Get(this.LastBarIndexPainted).

              Again, Close[0] cannot be used within the custom plot, as it refers to the current bar, which may have nothing to do with the section of the chart actually shown on the screen.
              Last edited by Harry; 04-22-2015, 09:58 AM.

              Comment


                #22
                Originally posted by outsource View Post
                I`m trying to achieve just that.to control the upper and lower margin of the Y scale.What additional information you need to compose a prototype of your custom plot?Please,let me know.

                btw,almost all parts already in this thread.

                Sincerely
                To control those, you need to use the unsupported, undocumented GetMinMaxValues() method.

                Here is the previous answer that I gave: http://www.ninjatrader.com/support/f...482#post320482

                Comment


                  #23
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hello outsource,

                  I need to add in that overriding the Plot() is not supported by NinjaTrader to do.

                  Also, using ChartControl is not supported by NinjaTrader as well.

                  That said, the Plot() method triggers whenever something changes on the chart. If the chart is clicked, moved, a tick is received. Think of this as the OnRender() method.

                  This will trigger on a change and will not require that F5 be hit on your keyboard. You can test this by printing outside of any conditions on the first line of the Plot override.

                  Also, Close[0] is available to the Plot override (you can test this as well by printing outside of any conditions on the first line of the Plot override).
                  So,in other words,with this unsupported method i should keep my chart on the foreground at all times,in order the scale not to jump up and down,and would need ~80 laptops for ~80 markets to monitor?Am i correct?

                  Comment


                    #24
                    Originally posted by outsource View Post
                    So,in other words,with this unsupported method i should keep my chart on the foreground at all times,in order the scale not to jump up and down,and would need ~80 laptops for ~80 markets to monitor?Am i correct?
                    No you are not correct. Nobody mentioned that it is necessary to keep your chart in the foreground. Also you would not need 80 laptops, but you would just need a few more skills, if you wish to code your own indicators.

                    Rather than annoying us with naughty comments I would suggest to follow a course in C# and then study the code already available. Also, if you need some help you should disclose the information necessary for allowing to answer your questions. Alternatively, you could search for somebody to do the job for you.

                    Comment


                      #25
                      @NinjaTrader_ChelseaB

                      May i ask once again the Support to confirm,that the indicator(the way it`s coded and the methods that were used) will only work correctly,as far as the Y axis issue is concerned,on the foreground,and if i move,minimize,or overlap the chart with other window and then bring the chart with the indicator back,it may cause change/errors/failurs in contrast to the originally set parameters?Hence,having to use 80 laptops for each indicator,to have it on the foreground,to have it stable, still prevails?

                      Thank you

                      Comment


                        #26
                        Hello outsource,

                        I cannot assist with unsupported code.

                        However, this thread will remain open for any community members that would like to contribute.
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by warreng86, 11-10-2020, 02:04 PM
                        7 responses
                        1,360 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Started by Perr0Grande, Today, 08:16 PM
                        0 responses
                        5 views
                        0 likes
                        Last Post Perr0Grande  
                        Started by elderan, Today, 08:03 PM
                        0 responses
                        9 views
                        0 likes
                        Last Post elderan
                        by elderan
                         
                        Started by algospoke, Today, 06:40 PM
                        0 responses
                        10 views
                        0 likes
                        Last Post algospoke  
                        Started by maybeimnotrader, Today, 05:46 PM
                        0 responses
                        14 views
                        0 likes
                        Last Post maybeimnotrader  
                        Working...
                        X