Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rising & Falling issue

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

    Rising & Falling issue

    Hello,
    I'm having an issue with my the Rising() & Falling(). I've programed certain things to happen with a rise or fall and according to the Data Box there was no change in the value of the indicator I'm following. However the value of the indicator apparently did change because the rising or falling condition became true. Likely the decimal value extends further then the Data Box is showing. If this is the case is there a way to control this in the Rising()/Falling() so that these methods only consider to .00
    Thanks

    #2
    Hello,

    Thanks for the forum post.

    You will need to add Print() statements to your code to find out exactly what is executing and what the variables are to find where the issue is. if you are still running into issue after doing this please let me know and post your output from the Variables being printed and code flow being printed and I can take a quick look.

    Support for the development of custom automated trading strategies using NinjaScript.


    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Thank you Brett for the Print() advice. The value is indeed factoring past the 2nd decimal. In fact it's going to the 13th!. I figured this would be the case. Visually I look at the line on the chart and the data box and everything looks flat and that is what I base the strategy on. Is there a way to manipulate the Rising() and Falling() to only figure to the 2nd decimal point?

      Comment


        #4
        No problem.

        You would need to round the inputs. To do this use Math.Round(Variable0, 2); for exmple to round to the second decimal place.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        666 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        377 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X