Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Simple EMA strategy does not take any trades.

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

    Simple EMA strategy does not take any trades.

    Dear All,

    I am new to NinjaTrader, literally 2 weeks old and without any knowledge of programming. Watching various videos I have developed a simple EMA strategy and trying to test it but it does not take any trades!

    Is anyone able to help me out here? I follow all the steps in the Strategy builder but I believe I am missing something very fundamental.

    Thank you for reading this post. Any help is welcomed.

    Cheers,

    Amit

    #2
    Hello Amit,

    Thanks for your post and welcome to the Ninjatrader forums!

    I removed your strategy as we do not permit posting obfuscated/protected code. You are welcome to post the source code if you wish.

    Anytime a script (Indicator or Strategy) is not working as expected, the first check is to see if there are any error messages related to the script showing in the "Log" Tab of the NinjaTrader7 control center.

    If there are no errors, then how are you testing the strategy? On a chart with live data or in the strategy analyzer or in market replay?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul,

      I did not know the source was protected. I exported and then shared it.

      I am running the strategy in Strategy analyser and put in input parameters which shows there are thousands of permutations possible and it takes 15 minutes to run but then the results are always zero, hence I assume the strategy is not making any trades.

      Best wishes,

      Amit

      Comment


        #4
        Hello Amit,

        Thanks for your reply.

        Are you selecting a particular instrument/contract for the strategy analyzer to use?

        Are you using the "optimizer" of the analyzer? If so I would suggest just using backtest until you are generating results.

        One issue could be that you do not have data for the analysis period for the chosen instrument, a good way to test this is to use the strategy SampleMACrossover in your NinjaTrader. This strategy is an "always in" meaning it will start trading and then will end each trade with another trade. Please run this strategy over the same settings you have been using. If no results then it would be a data issue.

        For future reference, regarding export, please see the section, "Exporting NinjaScript Indicators or Strategies as Source Files" in this page: https://ninjatrader.com/support/help...t7/?export.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hi Paul,

          I have selected Backtest on Sample MA Crossover. MES as the instrument. And still not results.

          1. Do I need to select a specific contract? i.e MES09-20?

          2. How do I import the data?

          Best wishes,

          Amit

          Comment


            #6
            I am connected to the NinjaTrader Continuum. Do I need to disconnect it and connect with other data?

            Comment


              #7
              Hello Amit,

              Thanks for your replies.

              Yes, you would need to select a specific contract.

              If you are connected to a data feed and run the analyzer, the first action will be that the analyzer will download the historical data needed for the duration of the analysis period. Once it has been downloaded it will not need to download again.

              I would suggest testing with MES 09-20 and using a short period of a couple of months using the SampleMACrossover. Once you have results then expand your start date. Please note that the MES is a new instrument and there would be a limit as to how far back you will find historical data. (I think May 2019 was the first data for MES). You may also want to test using the ES 09-20 which will provide a larger historical data volume.

              Next test with your strategy.

              Continue to observe the "log" tab of the control center for any relevant error messages.

              Here is a link to the help guide section that contains a video on running a backtest: https://ninjatrader.com/support/help...a_strategy.htm






              Paul H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bortz, 11-06-2023, 08:04 AM
              47 responses
              1,610 views
              0 likes
              Last Post aligator  
              Started by jaybedreamin, Today, 05:56 PM
              0 responses
              9 views
              0 likes
              Last Post jaybedreamin  
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              19 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              6 views
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              16 views
              0 likes
              Last Post Javierw.ok  
              Working...
              X