• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyzer Graph Issue

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

    Market Analyzer Graph Issue

    I am using a Market Analyzer Column with the graphic display in NinjaScript which works fine. If reloaded during the break when the market it closed, it seems like everything turns green and might need to wait for another bar which updates the cell value before the color is fixed. The value is correct, they range from -6 to +6, but the values below 0 that should be red remain green. Even after reloading NS, I get the same display. The "Sale Graphs in Analyzer example" is the image after about an hour after the market re-opens. I have circles a few of the negative numbers which should be red.

    I needed to duplicate the MA window to get the colors to update properly. This can be seen in the "Duplicated Analyzer Example".

    Is there something I need to add in the OnBarUpdate() to refresh this window? I do not update the "CurrentValue" variable on each bar, but only when the value is changed. This happens maybe every 10 bars.
    Attached Files

    #2
    Hello NJA_MC,

    Thank you for your post.

    There is no function directly correlated to update the visual display of the Market Analyzer through NinjaScript.

    Are these custom MarketAnalyzerColumns or are these Indicator columns in the Market Analyzer with custom Indicators?

    You refer to using the MarketAnalyzerColumn graphic display. Can you detail how you are achieving this?

    I look forward to your response.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Hi Patrick,

      I think they are custom MA Columns (not sure how to do the Indicator type).

      I have a few screen shots to help you understand. There is a before and after reload and the MA Config. It seems like a simple "Reload NinjaScipt" on the MA window causes the "red" to disappear. Comes back over time, I would imagine once the cells are updated by the script (which can take hours based upon market conditions).

      So it looks like when the NinjaScript is reloaded, maybe there is some cashed value or something are not cleared so when the script reloads the "Bar Graph" doesn't check the color setting until the "CurrentValue" is updated by the script.
      Attached Files

      Comment


        #4
        Hello NJA_MC,

        Thank you for your response.

        You are correct that the update will not occur until the update of data occurs. There is no means to force a visual update to the Market Analyzer. The Market Analyzer is not meant to display visual items as a chart is meant to and therefore the functions available for the Market Analyzer in NinjaScript do not include visual elements.

        Please let me know if you have any questions.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Code for Debugging

          Originally posted by NinjaTrader_PatrickH View Post
          Hello NJA_MC,

          Thank you for your response.

          You are correct that the update will not occur until the update of data occurs. There is no means to force a visual update to the Market Analyzer. The Market Analyzer is not meant to display visual items as a chart is meant to and therefore the functions available for the Market Analyzer in NinjaScript do not include visual elements.

          Please let me know if you have any questions.
          Thanks,

          It would be nice if the "Bar Graph" function could be recalculated on a reload. Seems like that is what is causing the problem. When I reload the script I would expect the results to be the same as if I duplicate the chart and this isn't the case so something is cached in that case. The values are right in the cells, but the top level "Bar Graph" failed to set the color to red in this case.

          EDIT: After some testing, this looks like a bug. I have created a few test MACs and a template. Once you have around 3 instruments when you refresh the window (Reload or F5), some of the "TestMinus 10" forgets to turn back to red. It seems random. Can you open a bug report?
          Attached Files
          Last edited by NJA_MC; 02-20-2018, 04:09 PM. Reason: Added Test MACs

          Comment


            #6
            Hello NJA_MC,

            Thank you for your response.

            The Market Analyzer is not designed to display graphics like the chart. Can you detail how you are drawing these bar graphs in the cells of the columns?

            I look forward to your response.
            Patrick H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              Hello NJA_MC,

              Thank you for your response.

              The Market Analyzer is not designed to display graphics like the chart. Can you detail how you are drawing these bar graphs in the cells of the columns?

              I look forward to your response.
              I have edited my previous message to add some test code to debug the MAC issue. As shown in previous attachments, I am using the designed in "Bar Graph" to display the Green/Red within the cell. Load up my template and example the "TestPlus 10"/"TestMinus 10" columns to see how to configure this feature. You will see the "Bar Graph" under the "type" setting.

              Comment


                #8
                Hello NJA_MC,

                Thank you for your patience.

                I see what you are detailing now. However, you are only seeing this on Static values that do not update on an event like OnMarketData?

                I look forward to your response.
                Patrick H.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_PatrickH View Post
                  Hello NJA_MC,

                  Thank you for your patience.

                  I see what you are detailing now. However, you are only seeing this on Static values that do not update on an event like OnMarketData?

                  I look forward to your response.
                  Hopefully you were able to load up the test case I published as this shows the actual issue. The static values actually update on each bar, but update the same value. The issue is on the "Reload or F5" on the Market Analyzer. When this is done, the -10 value turns green if you have enough instruments in the MA window. But as you can see, it isn't all of the rows but some clearly are at -10 and Green, when the MA window should make them Red.

                  Comment


                    #10
                    Hello NJA_MC,

                    Thank you for your response.

                    Do you have an example script that updates? The scripts you provided (attached here on this post) do not update their CurrentValue past the Configure State.

                    Can you attach a simplified version of your actual Market Analyzer Columns that use a MarketData or FundamentalData event to update their CurrentValue?

                    I look forward to your response.
                    Attached Files
                    Patrick H.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_PatrickH View Post
                      Hello NJA_MC,

                      Thank you for your response.

                      Do you have an example script that updates? The scripts you provided (attached here on this post) do not update their CurrentValue past the Configure State.

                      Can you attach a simplified version of your actual Market Analyzer Columns that use a MarketData or FundamentalData event to update their CurrentValue?

                      I look forward to your response.
                      Patrick,

                      I have attached a version where the update is in the OnBarUpdate(), I get the same results. As you can see, the values in the panel are correct +10 & -10, but the color is wrong. The only problem I am having is the color.

                      Regards
                      Attached Files

                      Comment


                        #12
                        Hello NJA_MC,

                        Thank you for your response.

                        A MarketAnalyzerColumn has no concept of OnBarUpdate as there is no bar series applied. You would use OnMarketData or OnFundamentalData:
                        If you wish to use OnBarUpdate then create an indicator and pass it through the Indicator MarketAnalyzerColumn in the Market Analyzer.

                        Please let me know if you have any questions.
                        Patrick H.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_PatrickH View Post
                          Hello NJA_MC,

                          Thank you for your response.

                          A MarketAnalyzerColumn has no concept of OnBarUpdate as there is no bar series applied. You would use OnMarketData or OnFundamentalData:
                          If you wish to use OnBarUpdate then create an indicator and pass it through the Indicator MarketAnalyzerColumn in the Market Analyzer.

                          Please let me know if you have any questions.
                          Okay,

                          I have uploaded my last attempt at trying to illustrate the problem. We can debate if the OnBarUpdate() works as the data series is selected through the config dialog, but what I have done is changed the test script to use the "OnMarketData()", the same problem occurs. The DATA in the cell is correct, it is simply not rendered correctly upon "Reload", some of the cells turn green.

                          This meets your requirements for a MAC, but still doesn't render properly upon reload. Make sure you have 3 or 4 instruments in the MA panel.
                          Attached Files

                          Comment


                            #14
                            Hello,

                            Thank you for this sample, I was able to see what you have pictured happening on my end. I am currently investigating any possible solutions. If I cannot find any solution here I will be submitting a bug report. Once I have further details I will reply back here.

                            Edit: You can track this request using the following ID: 12576


                            I look forward to being of further assistance.
                            Last edited by NinjaTrader_Jesse; 03-07-2018, 03:15 PM.
                            JesseNinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by levikNT, Today, 04:39 AM
                            1 response
                            12 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by chartish, Today, 08:36 AM
                            2 responses
                            14 views
                            0 likes
                            Last Post chartish  
                            Started by login_dejavu, Yesterday, 04:58 AM
                            1 response
                            14 views
                            0 likes
                            Last Post NinjaTrader_RyanS  
                            Started by NinjaTrader_PaulH, Today, 07:40 AM
                            0 responses
                            4 views
                            0 likes
                            Last Post NinjaTrader_PaulH  
                            Started by awesometrader, Today, 06:59 AM
                            2 responses
                            9 views
                            0 likes
                            Last Post awesometrader  
                            Working...
                            X