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, 01: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 pjsmith, Today, 01:00 AM
          1 response
          10 views
          0 likes
          Last Post NT-Roland  
          Started by alejandro888, Yesterday, 08:41 PM
          0 responses
          9 views
          0 likes
          Last Post alejandro888  
          Started by UltraNIX, Today, 02:14 AM
          0 responses
          5 views
          0 likes
          Last Post UltraNIX  
          Started by augustfay, Yesterday, 12:06 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by klaus w, Yesterday, 12:13 PM
          2 responses
          24 views
          0 likes
          Last Post klaus w
          by klaus w
           
          Working...
          X