Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SMA 200 on Current ES Contract

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

    SMA 200 on Current ES Contract

    Hi
    I have a strategy that shows the same value for SMA50 and SMA200 when runned on the current ES contract (June13) (timeframe 25 min)
    This is the debug
    SMA50=1559.63125 SMA200=1559.63125
    I

    It works with continous contract-

    How can I fix that given I cant trade ES##-##

    Thanks,

    #2
    Hello gileper,

    Thanks for your note.

    For both the ES 06-13 and ES ##-##, the SMA(50) and SMA(200) should not be returning the same values.

    I will need to see the code you have written to understand what may be happening.
    Please paste a sample of the code you are using to print these errors.


    I look forward to your reply.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi thanks for quick reply. Actually it is quite urgent.

      If I run live this strategy on June contract ( RTH 25 min) I got this in the debug print and the strategy doesnt trade.

      Instead on the ##-## it is fine.

      Attached the code and the debug
      Attached Files

      Comment


        #4
        Even without Strategy if I open a new chart I get this with ES 06-13.
        Attached the chart,...(the ES#### is fine)
        Attached Files

        Comment


          #5
          Hello gileper,

          Thanks for the reply.

          The sma line from the screenshot you have supplied looks to be the sma(50).

          The sma(200) line appears to be using the values for the sma(50).

          Because this behavior is far from expected I would like to schedule a support call with you.
          Please send an email to support[at]ninjatrader[dot]com. In the body of the email please write Attn: Chelsea #819997.

          I will schedule a suppport call with you and we will get the sma(200) issue resolved.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            If in the strategy I set # days to load to let say 50 the two mean are different.
            Also in the chart if I start from 16 march after two days they diverge after 2 days.

            Actually the ES #### behaves the same, I did not notice that the same strategy running on the continuous contract had set day to load to 50

            Maybe that is the point, but then i wonder why maximum bars look back does not take care of the needed bars for computing the indicator.
            Attached the chart with 10 days of data
            Attached Files
            Last edited by gileper; 04-02-2013, 01:30 PM.

            Comment


              #7
              Hello gileper,

              I had originally thought the issue may be that there are not enough bars to do the calculations due to either not enough days to load set or too large of an interval for the days that are loaded.

              However, I added the SMA(50) and SMA(200) to a chart with the ES 06-13 1M with 1 Days to load set here on my end.

              Attached is an image of the results.
              Attached Files
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hi
                Your chart is 25min isnt it, or 1? You wrote "1M with 1 Days"
                Did you set to 1 as days to load?

                best

                Comment


                  #9
                  Hello gileper,

                  You are correct, that was my mistake.

                  I was using a 25 minute chart as that is what I saw in your screenshot as well.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Thanks,
                    Just now I have attached the chart with 10days of data. As you can see always the smas are coupled for 2 days. (Post #6)

                    Comment


                      #11
                      Hi gileper,

                      Thanks for the screenshot.

                      I realized that my chart has the default 24/7 session template applied to it.

                      Using the default template I am looking at chart that is similar to yours.

                      For an accurate sample the SMA(200) will need to have at least 200 bars of data loaded on the chart.

                      After doing some testing, I have found that the days to load at 7 or more will make the results accurate for todays bars on a 25 minute chart using the instrument settings for the session template.

                      Increasing from 7 days to load did not make any discernible difference to today's bars on the chart.


                      Please let me know if you are not getting the same results.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        I wonder why we have so different bars.
                        the time on my machine is CET.
                        Attached Files

                        Comment


                          #13
                          Can you post the same chart with ETH?

                          I agree with the 7 days result.

                          In the chart I agree that you need to load enough days.
                          But in the strategy this is bad. I thought max days # lookback was taking care of that aspect.

                          Comment


                            #14
                            Hi gileper,

                            I've attached a screenshot of how my chart looks now.

                            I'm using the instrument settings for the session template. This means it will be using the CME US Index Futures ETH session template.

                            The Maximum bars look back refers to the farthest NinjaTrader will use historical data to calculate new values. This is to conserve memory.

                            Below is a link to the help guide on MaximumBarsLookBack.
                            http://www.ninjatrader.com/support/h...rslookback.htm

                            I believe what you would like to use is BarsRequired.

                            For example:

                            if (CurrentBar < BarsRequired)
                            return;

                            Below is a link to the help guide on BarsRequried.
                            http://www.ninjatrader.com/support/h...srequired2.htm


                            Please let me know if this does not resolve your inquiry.
                            Attached Files
                            Chelsea B.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                            0 responses
                            648 views
                            0 likes
                            Last Post Geovanny Suaza  
                            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                            0 responses
                            369 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by Mindset, 02-09-2026, 11:44 AM
                            0 responses
                            108 views
                            0 likes
                            Last Post Mindset
                            by Mindset
                             
                            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                            0 responses
                            572 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by RFrosty, 01-28-2026, 06:49 PM
                            0 responses
                            574 views
                            1 like
                            Last Post RFrosty
                            by RFrosty
                             
                            Working...
                            X