Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error: CrossAbove() and CrossBelow()?

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

    Error: CrossAbove() and CrossBelow()?

    The third overloads make no sense. A double is a single specific value, so a double cannot cross anything.

    Maybe you can explain better what they are supposed to mean?
    Last edited by koganam; 09-12-2016, 01:27 PM.

    #2
    I'm sure it works just the same as the 2nd one. Or is it in reverse?

    Comment


      #3
      Hello Koganam, and thank you for your report.

      With the methods CrossAbove and CrossBelow, a fixed point "crossing above" a series is identical to a series crossing below a value, and vice-versa. The following table should help make this clear.

      • Series has crossed above value
        • CrossAbove(value, series, lookback)
        • CrossBelow(series, value, lookback)


      • Series has crossed below value
        • CrossAbove(series, value, lookback)
        • CrossBelow(value, series, lookback)



      Please let us know if there are any other ways we can help.
      Last edited by NinjaTrader_JessicaP; 09-12-2016, 01:14 PM.
      Jessica P.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_JessicaP View Post
        Hello Koganam, and thank you for your report.

        With the methods CrossAbove and CrossBelow, a fixed point "crossing above" a series is identical to a series crossing below a value, and vice-versa. The following table should help make this clear.

        • Series has crossed above value
          • CrossAbove(value, series, lookback)
          • CrossBelow(series, value, lookback)


        • Series has crossed below value
          • CrossAbove(series, value, lookback)
          • CrossBelow(value, series, lookback)



        Please let us know if there are any other ways we can help.
        I understood the import and thought that might be what was intended. It does not change the fact that it does not make lexical sense. A single value is a fixed reference: it cannot cross anything.

        Comment


          #5
          Our teams responsible for the help guide documentation have been made aware of this thread, and any information we add will automatically be made available to them.
          Jessica P.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_JessicaP View Post

            With the methods CrossAbove and CrossBelow, a fixed point "crossing above" a series is identical to a series crossing below a value, and vice-versa. The following table should help make this clear.

            • Series has crossed above value
              • CrossAbove(value, series, lookback)
              • CrossBelow(series, value, lookback) <-- WTF?


            • Series has crossed below value
              • CrossAbove(series, value, lookback) <-- WTF?
              • CrossBelow(value, series, lookback)



            Please let us know if there are any other ways we can help.
            Hi Jessica,

            I'm looking at this very carefully, and I think your table is wrong.

            Can you better explain why your table is correct?
            What am I missing?

            Thanks

            Comment


              #7
              Hello bltdavid,

              I have tested the above on my end, and it has born out in all my tests. I am including the sort of script I test with, although this is not the version I used when I tested.

              I would like to ask, can you prepare a short test which gives you different results, and include a copy of the script you use, a Tools -> Export -> Historical Data -> Export file with the data you are using, and a screen shot of your results, so that I can try to reproduce what you are seeing on my end?

              To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.
              Click here for instructions
              Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
              Click here for detailed instruction
              Attached Files
              Last edited by NinjaTrader_JessicaP; 09-13-2016, 07:53 AM.
              Jessica P.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by bltdavid View Post
                Hi Jessica,

                I'm looking at this very carefully, and I think your table is wrong.

                Can you better explain why your table is correct?
                What am I missing?

                Thanks
                You are missing nothing. The mathematical effect is the same; the problem is that it makes no lexical sense regardless.

                She says somewhat correctly: "a fixed point "crossing above" a series is identical to a series crossing below a value ... " (emphasis mine). There lies the rub: it is a contradiction to talk of a "fixed" point crossing anything, which would imply that the fixed point moves, and hence is not fixed.

                Comment


                  #9
                  Originally posted by NinjaTrader_JessicaP View Post
                  Hello bltdavid,

                  I have tested the above on my end, and it has born out in all my tests. I am including the sort of script I test with, although this is not the version I used when I tested.

                  I would like to ask, can you prepare a short test which gives you different results, and include a copy of the script you use, a Tools -> Export -> Historical Data -> Export file with the data you are using, and a screen shot of your results, so that I can try to reproduce what you are seeing on my end?

                  To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.
                  Click here for instructions
                  Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
                  Click here for detailed instruction
                  Sorry, Jessica. Perhaps I was unclear.

                  In the NT8 documentation for CrossAbove, it says,

                  Code:
                  [B]Method Return Value[/B]
                  This method returns [COLOR=#0000ff]true[/COLOR] if a cross above condition occurred; otherwise, [COLOR=#0000ff]false[/COLOR].
                    
                  [B]Syntax
                  CrossAbove(ISeries<[COLOR=#0000ff]double[/COLOR]> series1, ISeries<[COLOR=#0000ff]double[/COLOR]> series2, [COLOR=#0000ff]int [/COLOR]lookBackPeriod)
                  CrossAbove(ISeries<[COLOR=#0000ff]double[/COLOR]> series1, [COLOR=#0000ff]double[/COLOR] value, [COLOR=#0000ff]int [/COLOR]lookBackPeriod)
                  CrossAbove([COLOR=#0000ff]double [/COLOR]value, ISeries<[COLOR=#0000ff]double[/COLOR]> series2, [COLOR=#0000ff]int[/COLOR] lookBackPeriod)[/B]
                  I don't know how to reconcile your "table" with the documentation. Specifically, the last CrossAbove overload somehow becomes re-associated with CrossBelow in your table.

                  In the new overload (the third one listed above), the first argument is a fixed value. Could you please explain why a fixed value is perceived to "cross" something?

                  I don't think you understand that a fixed, non-moving thing, call it 'A', is simply not logically able to do the crossing of the other moving thing 'B'. It is 'B' that is moving, so only 'B' can do the crossing. Think about it: 'A' does not move, it remains stationary, so logically it cannot cross anything; 'A' gets crossed, because 'B' does the crossing.

                  This is the mental model: the first argument 'A' does the crossing. It is holy. Do not mess with things that are holy.

                  Look, let's cut to the chase. You guys have stupidly introduced this new overload for CrossAbove and CrossBelow in NT8 that is complete nonsense. You should remove it at once and punish the engineer who added it by making him/her buy everyone a beer at the next All-Hands company meeting.

                  In NT7, every programmer quickly developed the mental model that the first argument is crossing the second argument. This is a well-accepted mental model you established for NT7, and now we all carry this mental baggage forward into NT8.

                  The problem is, you are now expanding this CrossAbove/Below model with a new overload in NT8 that brings no additional value to the programmer.

                  In what mental universe does this new API overload make sense?

                  The accepted mental model is this:
                  In NT7, the first argument has always done the crossing.
                  In NT7, the first argument was always a data series.
                  In NT7, the second argument could be a fixed value or another data series.

                  NT8 has just exploded everyone's brain by discharging 2 of the 3 well-known aspects of our well-established mental model of what 'crossing' means.

                  Your new overload in NT8 is not well documented. In no way is the usefulness clearly established. I mean, none of your examples in the documentation even demonstrate this new overload actually being used.

                  And the most glaring aspect: the new overload is simply not needed. I dare you: tell us exactly what problem the new CrossAbove/Below NT8 overload is solving that was not already solvable with the old NT7 API?

                  You're messing with our mental model of how 'crossing' is defined -- this new additional overload makes the well-established 'crossing' model less elegant and unnecessarily muddy.

                  In summary: don't mess with things that are holy.

                  We demand a retraction!

                  [Edit: Sorry, I think I rambled a bit here. Still, I think you get my point.]

                  Comment


                    #10
                    Thank you for the added explanation bltdavid.

                    I do believe we are on the same page. I tried to convey this by throwing "cross above" in quotes, but I believe you explicitly stating what is meant is very useful to people coming across this page, and I would like to thank you for writing all that out.

                    Thank you also for pointing out that the first argument crossing over the second is likely to be more intuitive to our users than the current behavior.

                    Both these pieces of information will be taken into consideration as we continually improve NinjaTrader. As with any change to NinjaTrader, we must weigh the stability of the overall platform against the benefits of any change. Both of these can impact our user experience. Stability as a concern aside, there may also be users who have adapted to or even prefer the new convention. However, please be assured that the best possible user experience for the greatest number of users is our goal, and our responsible teams will take your feedback into account when making decisions.

                    Once again, I would like to thank both of you for bringing this to our attention and for helping to improve NinjaTrader 8.
                    Jessica P.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by bltdavid View Post
                      Sorry, Jessica. Perhaps I was unclear.

                      In the NT8 documentation for CrossAbove, it says,

                      Code:
                      [B]Method Return Value[/B]
                      This method returns [COLOR=#0000ff]true[/COLOR] if a cross above condition occurred; otherwise, [COLOR=#0000ff]false[/COLOR].
                        
                      [B]Syntax
                      CrossAbove(ISeries<[COLOR=#0000ff]double[/COLOR]> series1, ISeries<[COLOR=#0000ff]double[/COLOR]> series2, [COLOR=#0000ff]int [/COLOR]lookBackPeriod)
                      CrossAbove(ISeries<[COLOR=#0000ff]double[/COLOR]> series1, [COLOR=#0000ff]double[/COLOR] value, [COLOR=#0000ff]int [/COLOR]lookBackPeriod)
                      CrossAbove([COLOR=#0000ff]double [/COLOR]value, ISeries<[COLOR=#0000ff]double[/COLOR]> series2, [COLOR=#0000ff]int[/COLOR] lookBackPeriod)[/B]
                      I don't know how to reconcile your "table" with the documentation. Specifically, the last CrossAbove overload somehow becomes re-associated with CrossBelow in your table.

                      In the new overload (the third one listed above), the first argument is a fixed value. Could you please explain why a fixed value is perceived to "cross" something?

                      I don't think you understand that a fixed, non-moving thing, call it 'A', is simply not logically able to do the crossing of the other moving thing 'B'. It is 'B' that is moving, so only 'B' can do the crossing. Think about it: 'A' does not move, it remains stationary, so logically it cannot cross anything; 'A' gets crossed, because 'B' does the crossing.

                      This is the mental model: the first argument 'A' does the crossing. It is holy. Do not mess with things that are holy.

                      Look, let's cut to the chase. You guys have stupidly introduced this new overload for CrossAbove and CrossBelow in NT8 that is complete nonsense. You should remove it at once and punish the engineer who added it by making him/her buy everyone a beer at the next All-Hands company meeting.

                      In NT7, every programmer quickly developed the mental model that the first argument is crossing the second argument. This is a well-accepted mental model you established for NT7, and now we all carry this mental baggage forward into NT8.

                      The problem is, you are now expanding this CrossAbove/Below model with a new overload in NT8 that brings no additional value to the programmer.

                      In what mental universe does this new API overload make sense?

                      The accepted mental model is this:
                      In NT7, the first argument has always done the crossing.
                      In NT7, the first argument was always a data series.
                      In NT7, the second argument could be a fixed value or another data series.

                      NT8 has just exploded everyone's brain by discharging 2 of the 3 well-known aspects of our well-established mental model of what 'crossing' means.

                      Your new overload in NT8 is not well documented. In no way is the usefulness clearly established. I mean, none of your examples in the documentation even demonstrate this new overload actually being used.

                      And the most glaring aspect: the new overload is simply not needed. I dare you: tell us exactly what problem the new CrossAbove/Below NT8 overload is solving that was not already solvable with the old NT7 API?

                      You're messing with our mental model of how 'crossing' is defined -- this new additional overload makes the well-established 'crossing' model less elegant and unnecessarily muddy.

                      In summary: don't mess with things that are holy.

                      We demand a retraction!

                      [Edit: Sorry, I think I rambled a bit here. Still, I think you get my point.]
                      Again, you state more elaborately my terse conclusion.

                      Comment


                        #12
                        Originally posted by koganam View Post
                        Again, you state more elaborately my terse conclusion.
                        You're welcome!

                        The ability to criticize well (without antagonizing) is a lost art.

                        I endeavor to that ideal.

                        [Edit: Yo! Yo! Wassup Obi-wan Koganam-san! Hey, what's a brutha ninja gotta do to get a super-senior black-belt master code-wacker to click on the forum 'Thanks' button every now and then? Huh? Huh? It's in the lower right corner. Yep, it still works, not broken. Yah Mon, move those Jedi eyeballs down Konobi-san, don't tell me you don't see it, dudesky. That carpal-tunnel from those 8,000 replies ain't stopping your mouse from going there -- good good, that's it, yeah yeah, move it, moooove itttt, steady on da mouse, ok, slow it down, careful -- almost there, hover over that 'Thanks' icon, now ready with da finger ... ok, quick, CLICK THE MOUSE! Whoa, holy mouse buttons, batman! See that? Pretty easy, doncha think? Thanks, Bro! ]

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by cre8able, Today, 01:01 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post cre8able  
                        Started by manitshah915, Today, 12:59 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post manitshah915  
                        Started by ursavent, Today, 12:54 PM
                        0 responses
                        3 views
                        0 likes
                        Last Post ursavent  
                        Started by Mizzouman1, Today, 07:35 AM
                        3 responses
                        17 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by RubenCazorla, Today, 09:07 AM
                        2 responses
                        13 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Working...
                        X