Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

¿how can i configure nt so the lines for low and high of day are always visible?

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

    ¿how can i configure nt so the lines for low and high of day are always visible?



    good day to everyone,



    i am trying to develop an indicator that will plot a horizontal line at some price levels of interest.



    but, i have a problem where if the current price is made to move lower or higher, those lines will be outside the range that nt displays on the screen and thus become useless.


    i want nt to have a range on screen that includes all the lines my indicator plots at all times. and for starters, i want to know ¿how can i configure nt so that the low and high of the day are always visible on screen? then i would just configure my own indicator in this same way.



    very well, thanks, regards.
    Last edited by rtwave; 03-02-2021, 08:51 AM.

    #2
    Hello rtwave,

    Thanks for your post.

    "i want to know ¿how can i configure nt so that the low and high of the day are always visible on screen? then i would just configure my own indicator in this same way."

    If you are using intraday data, I would suggest using the indicator CurrentDayOHL. This indicator will plot a line for the high and the low of the day. If you then set the indicators "Autoscale" to true (By checking the check box for "autoscale" when you apply the indicator) the chart will adjust to consider the price bars and now the indicators plots. Note that this action will cause the price bars to appear smaller and the price scale will feature larger steps in order to accommodate the full height of the price movement inside the High and low plots.

    All you need to do for your indicator is to set its "autoscale" to true and the chart will then adjust to fit the extremes of the plots and price.
    Paul H.NinjaTrader Customer Service

    Comment


      #3



      excellent.


      i will try this, a setting like this is exactly what i had in mind. hopefully, nt will make it available for my own indicators as well.



      thanks.

      Comment


        #4


        actually, i found this fragment of code that hopefully should work. i have now included it in my indicator, i will test it later today if i have a chance.


        Code:
        protected override void OnStateChange()
        {
        if (State == State.SetDefaults)
        {
        Name = "Example Indicator";
        // set this to true to call CalculateMinMix() to ensure drawing tool is fully rendered in chart scale
        IsAutoScale = true;
        }
        else if (State == State.Configure)
        {
        }
        }

        Comment


          #5
          Hello rtwave,

          Thanks for your reply.

          That is the correct code.

          If you create your indicator using the Indicator wizard you will find that that code is automatically added.

          Here is the help guide link to autoscale: https://ninjatrader.com/support/help...sautoscale.htm
          Paul H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ct, Today, 04:16 AM
          1 response
          5 views
          0 likes
          Last Post ct
          by ct
           
          Started by aeadon, Today, 02:27 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by op1031, Today, 01:52 AM
          0 responses
          1 view
          0 likes
          Last Post op1031
          by op1031
           
          Started by Aramunno, Yesterday, 10:11 PM
          2 responses
          18 views
          0 likes
          Last Post Aramunno  
          Started by sdauteuil, Yesterday, 09:38 PM
          0 responses
          6 views
          0 likes
          Last Post sdauteuil  
          Working...
          X