• 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

Troubleshooting values of SMA

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

    Troubleshooting values of SMA

    Hi programmers,

    I have bugs in my indicator and using the print statement to troubleshoot. This is what I found:

    Print("First" + SMA(7)[0]);
    Print("Second" + SMA(20)[0]);

    all give out EXACTLY the same results in my output window and as we know, these values should be different.

    Thanks

    #2
    Hello BernWillChris,

    Thank you for your note. I am not able to reproduce this issue on my end. Can you please send your code as well as what instrument you are testing on and what data provider you are connected to? If you do not wish to post this information on the forums, please send an email to platformsupport[AT]ninjatrader[DOT]com and add this ticket number in the body of your email: #1354138

    Thank you in advance.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Thanks for the reply,

      I'm using the instrument EUR/USD and FXCM feed(if that is what you asking for).

      The code is attached and commented too. It isn't too complex since I'm just getting started and testing things as I go.
      Attached Files
      Last edited by BernWillChris; 07-17-2015, 12:11 PM.

      Comment


        #4
        Hello BernWillChris,

        Here is an excerpt of the output window from when I run your indicator with an FXCM connection on $EURUSD:

        First1.08451428571429
        Second1.08455714285714
        First1.0845
        Second1.08455
        First1.08448571428572
        Second1.08453571428571
        First1.08447142857143
        Second1.08451428571428
        First1.08445714285715
        Second1.08449285714285
        First1.08444285714286
        Second1.08447857142857
        First1.08442857142857
        Second1.08447142857143

        These values are not the same and they line up with what I see when I add two SMA indicators to a EURUSD chart with respective periods of 7 and 20.

        Could you please take a screenshot of your output window where every SMA 7 value is the same as every SMA 20 value so I may investigate the issue further? Also please make sure when you open up a $EURUSD chart that it shows visible bars, indicating you have data loaded in the platform.

        Thank you in advance.
        Michael M.NinjaTrader Quality Assurance

        Comment


          #5
          OMG!! Silly me! I'm having one of those moments that I become blind to details...lol. Some of the values are so close that I have to scroll down further to see some with a greater and a more noticeable difference. Sorry to bring a problem this simple to the forum. I probably need to walk away until tomorrow.

          Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by PeterGolz, 01-17-2020, 10:42 AM
          11 responses
          71 views
          0 likes
          Last Post reubenlasky  
          Started by utilizator, Today, 11:36 AM
          0 responses
          4 views
          0 likes
          Last Post utilizator  
          Started by EnveousColnago, Today, 07:24 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by tornadoatc, Today, 10:31 AM
          0 responses
          3 views
          0 likes
          Last Post tornadoatc  
          Started by EnveousColnago, Yesterday, 05:43 PM
          5 responses
          30 views
          0 likes
          Last Post EnveousColnago  
          Working...
          X