Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The True Mean Value of a Bar

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

    The True Mean Value of a Bar

    Hi, I'm new to these posts hence excuse my ignorance if there is a quick and silly fix to the following; I use simple high low bars in some of my trading, I’m trying to plot the true mean of each bar plotted preferably as a small horizontal line at the mean price of each bar. I would then like to plot the horizontal line in green if price closes in the top 30% of the bars range, red if it closes in the bottom 30% of the bars range and orange if it closes between 30%-70% of the bars range. However I can not seem to get past step one which is getting a SMA to plot the mean of a single bar. For example if a bars range is 10-20 hence total range of 10 ticks the true mean should be at 15. I have set the simple MA indicator to plot the MA of 1 period hence I would expect a plot mid point at 15, however I do not get that result. It appears Ninja is defaulting to the close or last of the bar rather than the true mean. Is there a way of modifying this?

    #2
    Originally posted by FXBob View Post
    Hi, I'm new to these posts hence excuse my ignorance if there is a quick and silly fix to the following; I use simple high low bars in some of my trading, I’m trying to plot the true mean of each bar plotted preferably as a small horizontal line at the mean price of each bar. I would then like to plot the horizontal line in green if price closes in the top 30% of the bars range, red if it closes in the bottom 30% of the bars range and orange if it closes between 30%-70% of the bars range. However I can not seem to get past step one which is getting a SMA to plot the mean of a single bar. For example if a bars range is 10-20 hence total range of 10 ticks the true mean should be at 15. I have set the simple MA indicator to plot the MA of 1 period hence I would expect a plot mid point at 15, however I do not get that result. It appears Ninja is defaulting to the close or last of the bar rather than the true mean. Is there a way of modifying this?
    There is more than one way, but the simplest is to use the Median as the input price type. NT is using the "median" to mean (high+low)/2: it is correctly the mid-point.

    Comment


      #3
      Koganam thanks for the tip, shall try that, however where do I find the price input type? I've checked Data Series and also Properties? Under Data series I only see the option of Price based on Last, Bid or Ask? no mean or median, the other thing is I like to see the full range off the bar when looking at the data.

      Comment


        #4
        Bob, you would need to select to drive your SMA indicator on the Median series under 'Input Series' in the Indicator properties, the chart itself will either be driven on Last, Bid or Ask.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand, thanks that worked a treat, looks good now. Anyone got any idea's on how to plot the secondary requirement on the price chart; a horizontal line (at the mean price) in green if price closes in the top 30% of the bars range, red if it closes in the bottom 30% of the bars range and orange if it closes between 30%-70% of the bars range.

          Comment


            #6
            Originally posted by FXBob View Post
            Bertrand, thanks that worked a treat, looks good now. Anyone got any idea's on how to plot the secondary requirement on the price chart; a horizontal line (at the mean price) in green if price closes in the top 30% of the bars range, red if it closes in the bottom 30% of the bars range and orange if it closes between 30%-70% of the bars range.
            You will have to write a custom indicator to do that.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Unsuitable, Today, 07:26 PM
            0 responses
            1 view
            0 likes
            Last Post Unsuitable  
            Started by jvanelli, Today, 06:36 PM
            2 responses
            9 views
            0 likes
            Last Post NinjaTrader_EricB  
            Started by twitch251, Today, 05:14 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by robforee2, Today, 05:07 PM
            0 responses
            4 views
            0 likes
            Last Post robforee2  
            Started by blar58, Today, 03:16 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Melissa  
            Working...
            X