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

Histo

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

    Histo

    I want to write an indicator where the histogram oscillates around the 50 as opposed to 0. So, if the value > 50 histo plots from the 50 to the value above 50 and if value < 50 the histo plots from the 50 to the value below 50 . This is very easy to do when the values oscillate around 0 but can't figure out how to do this using the 50 instead.

    Thanks,
    Mike

    #2
    Hello Mike,

    Thank you for your post.

    The tutorial below will help with using plot thresholds.


    Essentially you will define two plots and the thresholds (Min and Max) for drawing them.

    Excerpt from the tutorial, modified to value 50:
    Plots[0].Min = 50;
    This statement says, in the collection of Plot objects, take the first one (Plots[0]) and set its minimum value to 50. This means any value below 50 will not display.
    Plots[1].Max = 50;
    This statement says, in the collection of Plot objects, take the second one (Plots[1]) and set its maximum value to 50. This means any value above 50 will not display.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Like I said in my earlier post, it's easy when the plot oscillates around 0. The example you provided is one that does just that. I want it to oscillate around 50. Those min and max values don't seem to fix my problem. Every histogram plots from 0 to the value not from 50 to the value.

      Comment


        #4
        Mike,

        This is unfortunately not possible. Values will be based off from zero. What you could try is to normalize the plot values around zero?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh...I've done just that and it works but isn't preferable. Just one of those happy to glad kind of differences.

          Thanks again,
          Mike

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          149 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          5 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          5 views
          0 likes
          Last Post tkaboris  
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,283 views
          0 likes
          Last Post Leafcutter  
          Working...
          X