Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volatilidad

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

    Volatilidad

    I get a different value when calculating volatility. It should be 75.25 and it is 86.54 Because?
    Attached Files

    #2
    Hello Gibranes,

    Thanks for your post.

    Unfortunately, I cannot see the code or chart in the screenshot you shared because the text is too small.

    Is this a custom NinjaScript indicator that you created or was it created by a third-party developer?

    How exactly are you calculating volatility in your script?

    Are you using the RVI() method in the script and comparing the output to the Relative Volatility Index indicator that comes default with NinjaTrader?

    What are you comparing the indicator to where you see a difference?
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Use standard derivation and the value is different from that of the indicator. It's my code
      World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

      Comment


        #4
        Hello Gibranes,

        Thanks for that information.

        I have created a simple test script that assigns StdDev(14)[0] to a variable and then draws that value on the chart using Draw.TextFixed().

        Once I added the test indicator to the chart and added the StdDev indicator to the chart using the exact same settings StdDef(14), I see the values match.

        See the attached image demonstrating this. I also attached the test script for you to view.

        In the image you shared it seems the StdDev indicator on your chart is not set to use the same settings as StdDev(14) in your custom indicator. This is likely causing the values to report differently.

        Ensure that you are setting the StdDev indicator to use the same exact settings as the call in your custom indicator.​
        Attached Files
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          I don't see the script. The values are the same 14

          Comment


            #6
            Hello Gibranes,

            Thanks for your notes.

            I have made the script available to view in post # 4. The script is also attached to this forum post.

            If the script is not behaving as expected then debugging prints should be added to the script to understand exactly how it is behaving. One line about your Draw.TextFixed() method, print out each of the values being used in your Draw method to confirm how they are evaluating.

            Below is a link to a forum post that demonstrates how to use prints to understand behavior.
            https://ninjatrader.com/support/foru...121#post791121

            Further, ensure that if your custom indicator is set to Calculate.OnPriceChange, that the NinjaTrader StdDev indicator also uses Calculate.OnPriceChange.
            Attached Files
            Brandon H.NinjaTrader Customer Service

            Comment


              #7
              If I see, it works well. Thank you.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by AaronKoRn, Today, 09:49 PM
              0 responses
              11 views
              0 likes
              Last Post AaronKoRn  
              Started by carnitron, Today, 08:42 PM
              0 responses
              10 views
              0 likes
              Last Post carnitron  
              Started by strategist007, Today, 07:51 PM
              0 responses
              11 views
              0 likes
              Last Post strategist007  
              Started by StockTrader88, 03-06-2021, 08:58 AM
              44 responses
              3,980 views
              3 likes
              Last Post jhudas88  
              Started by rbeckmann05, Today, 06:48 PM
              0 responses
              9 views
              0 likes
              Last Post rbeckmann05  
              Working...
              X