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

Setting a % off Days High Condition in Market Analayzer

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

    #16
    Hi Ryan,

    thanks... my only problem I think is understanding what it is measuring the 'high' from... I need it to basically measure from within the open to the high of day range, I believe the way it is coded now is going from the previous close to the high of day.

    Can I use the CurrentDayOHL().CurrentOpen[0] to get it to measure the % from high off the open rather than the previous close?

    Hope this makes sense and thanks!

    Comment


      #17
      The values used by these indicators will be based off your Session Begins and Session End times - if you're using 6.5. If you're using 7 then it based off the session template applied.

      Yes, you can use CurrentDayOHL().CurrentOpen[0] for the open price.

      Close[0] isn't the previous days close. It's the last price.
      Ryan M.NinjaTrader Customer Service

      Comment


        #18
        okay, I think, lol... This script is just for a market analyzer filter condition, so I have no session template applied to it... is there a way to add the session template into the MA's columns or to measure the indicator from open within the market analyzer's settings?

        Thanks again,

        Comment


          #19
          You can see which session template is applied by right clicking within the market analyzer > Properties. It's most likely using the instrument settings, which are then defined for each instrument.
          Ryan M.NinjaTrader Customer Service

          Comment


            #20
            Man, I don't know how I figured this out but came up with this over the weekend and seems to work... It is the full indicator and not just a MA condition so you can create any MA condition for it as far as relating to % off the high of day...

            seems to work,

            double myValue = ((CurrentDayOHL().CurrentHigh[0] - Close[0]) / (CurrentDayOHL().CurrentHigh[0] - CurrentDayOHL().CurrentLow[0]));


            Plot0.Set(myValue);
            Last edited by tshirtdeal; 10-11-2010, 09:20 AM.

            Comment


              #21
              Hmmmm...

              Market Analyzer is reading the plot differently then the plot charts... I have went over everything within MA as far as settings and can't find what is causing it... How can I get MA to read the indicator exactly the same as the chart?

              MA seems to be not honoring the high of the day and creating new points for the high I think.

              Thanks for any help,
              Reed

              Comment


                #22
                Reed, are you using the same CalculateOnBarClose, bar lookback and session settings as you used on the chart?
                BertrandNinjaTrader Customer Service

                Comment


                  #23
                  Hi Bertrand,

                  I am not positive because I am not sure where to access all of that... I just created the indicator and it plots fine on the chart in any timeframe but then when I add it to MA it gives a completely different value...

                  Can you tell me how to go about checking the "BarCloseUpdate", and session settings?

                  Thanks,
                  Reed

                  Comment


                    #24
                    Sure Reed, please right click in the MA and ensure it's properties are set exactly as in your chart.

                    BertrandNinjaTrader Customer Service

                    Comment


                      #25
                      Thanks,

                      I am using NT7 but the session templates are both set to "equities RTH" the chart is set for max bar lookback to 256...

                      The problem seems to be in the data series of the MA... It is judging the High Of Day of the bars I set for the timeframe, so if I set a value of 60 minutes it produces a different plot value then if I set a value of 30 minutes, the chart does not do this however and I can switch timeframes on the chart and the chart continues to create the value from the same high, which is the high of the day...

                      Anyway to over ride the MA data series and get it to produce the same plots as the chart?


                      +++++++Scratch that, it is from the # off bars look back... I changed it to 256 and it gets the same ready... but is that just giving me the high from 256 bars ago? Or does that make it read from the HOD?
                      Thanks,
                      Reed
                      Last edited by tshirtdeal; 10-13-2010, 12:20 PM.

                      Comment


                        #26
                        Glad to hear those values match up. There are many settings and they all have to be the same between chart and market analyzer to line up the values.
                        Ryan M.NinjaTrader Customer Service

                        Comment


                          #27
                          Thanks Ryan,

                          Everything else is going good to , so thanks for all the help! This indicator worked the rest of the day so it's all good... Hope it helps someone, I think it is a very important indicator for doing any type of equities scanning in MA... Really happy I could create the actual indicator so that you can just name any value for it you want without having to adjust the actual code.. Still have no idea how I even did it though , lol...

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by jclose, Today, 09:37 PM
                          0 responses
                          5 views
                          0 likes
                          Last Post jclose
                          by jclose
                           
                          Started by WeyldFalcon, 08-07-2020, 06:13 AM
                          10 responses
                          1,413 views
                          0 likes
                          Last Post Traderontheroad  
                          Started by firefoxforum12, Today, 08:53 PM
                          0 responses
                          11 views
                          0 likes
                          Last Post firefoxforum12  
                          Started by stafe, Today, 08:34 PM
                          0 responses
                          11 views
                          0 likes
                          Last Post stafe
                          by stafe
                           
                          Started by sastrades, 01-31-2024, 10:19 PM
                          11 responses
                          169 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Working...
                          X