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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        65 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        149 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        99 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X