• 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

effect or rounding on indicator performance and calculation

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

    effect or rounding on indicator performance and calculation

    Hello All,

    I am using method- rounding to get values I can easily compare across multiple elements of my indicator . what is the effect of rounding on an indicator. I noticed some of my moving average lines are not as smooth when using rounding.

    Regards,
    George

    #2
    Hi traderfolife777,

    Rounding can cause jaggedness because there are not as many smaller increments of values in the indicator.

    Rounding rounds the price. It doesn't change anything else. But by rounding the smaller increments that make the line smoother are removed.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Rounding

      so if I have a condition in which I need 2 values to be exact. how do I do that considering values in indicator have many decimals. Example.4042.567986.. what are my options to get .. EMA 20 equal VWMA 14. then action is to color a region.

      Comment


        #4
        Hi traderfolife777,

        You can round values in your conditions if that is what is needed for your logic that calls the indicators.

        However, you would not need to round the indicator values in the indicator code..
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by traderfolife777 View Post
          so if I have a condition in which I need 2 values to be exact. how do I do that considering values in indicator have many decimals. Example.4042.567986.. what are my options to get .. EMA 20 equal VWMA 14. then action is to color a region.
          You do not need to round here. You would check for the VWMA crossing the EMA to color a region. You can use two different colors, when it crosses above from below, and when it crosses below from above.

          The first condition would be

          if(VWMA(14)[0] > EMA(20)[0] && VWMA(14)[1] <= EMA(20)[1])

          the second condition would be set up accordingly.

          You should never check doubles for equality. This is not possible.

          Theoretically, you could round any value to the full tick, but this more complex than the solution shown above.

          Comment


            #6
            thank you very much that was very helpfull

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Dagamos, Today, 11:48 AM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_RyanS  
            Started by kantkant2, Yesterday, 03:20 PM
            4 responses
            24 views
            0 likes
            Last Post eDanny
            by eDanny
             
            Started by EnveousColnago, Today, 11:50 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by Skyfly1715, 01-20-2020, 03:36 PM
            4 responses
            33 views
            1 like
            Last Post eDanny
            by eDanny
             
            Started by Cyanez, Yesterday, 05:05 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Working...
            X