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

MarketAnalyzerColumns UnrealizedProfitLoss in Ticks script Background bug

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

    #16
    Hello Cormick,

    My response in post # 14 is to address why the behavior is occurring.

    To confirm, you are no longer interested in why the script is changing the color of the background in the Format() method when the turnery condition evaluates and sets the value?

    I'll will note your request for scripts to have more documentation.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Your post 14 response has nothing to do with why the 1st row displays color when no position is on 1st row instument and the Total Row is on while no coloring occurs when no position on 1st row and no Total Row is on. No amount of printing of ternary operatior statement would identify the why of that plateform bug.

      How to fix the bug of ES background coloring despite no ES position in your last video?
      How to fix the bug of ES background coloring despite no ES position in your last video?
      How to fix the bug of ES background coloring despite no ES position in your last video?
      How to fix the bug of ES background coloring despite no ES position in your last video?
      How to fix the bug of ES background coloring despite no ES position in your last video?
      How to fix the bug of ES background coloring despite no ES position in your last video?
      How to fix the bug of ES background coloring despite no ES position in your last video?
      How to fix the bug of ES background coloring despite no ES position in your last video?
      Last edited by Cormick; 03-23-2023, 12:57 AM.

      Comment


        #18
        Hello Cormick,

        I disagree that the information I have requested in prints is not related to the issue.

        The background is being set by your code below, is this correct?
        if (CellConditions.Count == 0)
        BackColor = value == 0 ? null : value > 0 ? Application.Current.FindResource("LongBackground") as Brush : Application.Current.FindResource("ShortBackground" ) as Brush;
        If this is commented out, is the background changing?

        If not, does this confirm this is the code causing the background to change?

        If this is the code causing the behavior, this is what we would focus on to figure out what is going to wrong, and what to report to our development.

        Please let me know if my assessment is incorrect, and if the background is still being set when these lines are commented out.​


        The repeated sentence in your most recent post is not helpful for progressing forward in a civil manner.

        It would not be the responsibility of the Engineering Support team to debug your code for you to determine what is causing the issue. We are able to guide you through the debugging process so that you are able to determine the issue, and if necessary we will report any bug in the platform to our development once identified.

        In the support department at NinjaTrader it is against our policy to create, debug, or modify, code or logic for our clients. Further, we do not provide C# programming education services or one on one educational support in our NinjaScript Support department. This is so that we can maintain a high level of service for all of our clients as well as our associates.

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.​

        To move forward, we will need to work together in a civil manner.

        If there is an issue, it will be necessary to determine what is causing the issue. Once determined, it can be reported or corrected in the logic of the script.

        If I am not focusing on the correct lines of code, please let me know on which lines code I need to focus on, and I will be happy to assist you in investigating in that direction.

        As far as I can tell that this time, the issue is caused by an unexpected value evaluated in the ternary conditions that set the BackColor property.
        Please let me know if this assessment is incorrect.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          I chanced repeating the number of post it took you to stop answering with begging the question suggestions. manifestedly it's not even enough.

          Again, start being civil by stop wasting time.

          Again, the error has nothing to do with the ternary operatior statement above, it coloring the background or not.

          The issue occurs as you could reproduce it yourself by adding the Total Row row to the market Analyzer. Such that without it the issue doesn't occur. Since no value in the ternary operator statement controls the Total Row reaction, no value of it can possibly be involved. But you already know that.

          What else would a cooperative customer support relevant technician need to know to figure out the cause by looking at the undisclosed syntax and semantic lacking documentation to fix the issue?

          Comment


            #20
            Hello Cormick,

            Again, start being civil by stop wasting time.
            My intention is not to waste time. My intention is to get the output I have requested so that we can fix the logic or report an issue.
            I have requested exactly what is necessary.
            How do you feel I am wasting time, if you are not providing the requested information so that we can move forward.

            Again, the error has nothing to do with the ternary operatior statement above, it coloring the background or not.
            I have not been provided any output that shows this.
            How do you know what the values are?

            What is the specific unexpected value you want to report?

            Reproducing it, does not provide any output that shows why the BackColor is being set. Only the print output can provide that.

            At this time, the only thing known, is the behavior is not as you expect. But we don't know why.

            How would you like to continue?

            What else would a cooperative customer support relevant technician need to know to figure out the cause by looking at the undisclosed syntax and semantic lacking documentation to fix the issue?
            I would need the requested information. The output of the values compared in the condition that sets the value. If the issue is that the value property from the Format() method does not match the CurrentValue, that would be something we can report. However at this time, that has not been determined as there has been no output provided.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #21
              If we could test for rows values independantly instead of per columns it might make sense to use the prints. See for yourself in attached prints and script.
              Please get the Market Analzyer Ttechnician who coded the Position Size and The UnrealizedPorfitandLoss scripts to fix the bug. thanks

              Attached Files

              Comment


                #22
                Hello Cormick,

                Thank you for reporting the behavior can be reproduced with the Position size market analyzer column included with NinjaTrader.

                If I am able to determine there is a bug I will report this.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #23
                  Thank you for the effective support and result in a timely fashion after multiple days for this built in plateform issue.
                  For the record no mention of the issue being reproduced with the Position Size script was made in the previous post. So as a time saver courtesy, please don't convey this erroneous assessment to the related MA technician for unpcoming response.

                  Comment


                    #24
                    Hello Cormick,

                    To report this, it will be necessary to print the value from the Format override, and CurrentValue as I have directed since the beginning of this inquiry.

                    As you have chosen not to do this, we could move forward.

                    Now that you are stating this affects a system script included NinjaTrader, it falls on our responsibility to add the debugging prints. I have added the same exact debugging prints I have directed you to add and immediately saw what was the issue.

                    Code:
                    Print(Instrument.FullName + " - value: " + value + ", CurrentValue: " + CurrentValue.ToString());
                    Which produced the output:
                    ZB 06-23 - value: -1, CurrentValue: -1
                    ES 06-23 - value: -1, CurrentValue: 0
                    Value was -1, CurrenValue was 0, these do not match, this is a bug. The output is able to show what the issue is and what needs to be reported.​

                    Specifically the incorrect value of the 'value' variable, is causing the ternary operator to return the incorrect brush. The is the 'value' variable used in the ternary operations, as I have expected.

                    With the output of one simple print and I am able to identify report the issue.
                    Had you provided this output when requested, I would have been able to report the issue after receiving the requested output identifying the issue.
                    Moving forward, if you want to report an issue from a script you have written yourself, you will have to follow our direction and provide the output from the debugging prints. We will not be able to do this on your behalf.
                    In the future, we will not be able to move forward with an issue in your custom code, unless you cooperate and provide the requested information. This will not change.

                    If there is an issue with a system script, you can report this and it will be our responsibility to investigate.


                    If you are uncomfortable adding prints and debugging your code to report an issue, you can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #25
                      I'll refrain from correcting the other wrong assessments made in your latest post as time saver courtesy.

                      Thank you for the testing. Please share the script you used to produce your output. I'll test on my end to see if I can reproduce it. thanks
                      For the record, I assumed the printing was to be done on the single actual trade position basis which does not reproduce the issue in the prints output.
                      Your output seems to be done on multiple positions basis. I can't be sure nor guess from the lack of attached script or demo video.

                      The point being, again, why is this BackColor bug happening only when the Total Row is turned on, but not when the Total row is turned off? Your output still does not address this issue.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by junkone, 04-21-2024, 07:17 AM
                      9 responses
                      67 views
                      0 likes
                      Last Post jeronymite  
                      Started by trilliantrader, 04-18-2024, 08:16 AM
                      4 responses
                      18 views
                      0 likes
                      Last Post trilliantrader  
                      Started by mgco4you, Today, 09:46 PM
                      1 response
                      10 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by wzgy0920, Today, 09:53 PM
                      0 responses
                      10 views
                      0 likes
                      Last Post wzgy0920  
                      Started by Rapine Heihei, Today, 08:19 PM
                      1 response
                      10 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Working...
                      X