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

more strategy help please

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

    more strategy help please

    hello

    my strat is producing amazing backtesting results. But I ran it today on NG 1-17 in sim mode..and it started with 1 ct then as it continued to take trades it would compound the contracts I guess.

    so basically it will trade anywhere from 2-4 contracts when the parameters are set to: default quantity '1'

    I went back and looked at everything..and I cant figure it out yet. the backtest results only show 1 contract traded per trade- for 8119 trades from 1-1-16 to 12-11-16. so it seems the problem is when I run it in sim or market replay.

    what should I do next? please help..

    thanks in advance!

    #2
    market replay seems fine actually...it is only in real-time sim mode.

    Comment


      #3
      Hello,

      Thank you for the post.

      This could be differences between historical trades and realtime trades. The backtest specifically has to use CalculateOnBarClose = true whereas in realtime intrabar data can be used. Are you using CalculateOnBarClose = false by chance?

      Can you confirm all of the strategies properties are the same as they were in the backtest?

      If so, this could potentially be logic related. WIthout seeing the logic it would be hard to say. Potentially an image of the results you are seeing would be helpful as well.

      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment


        #4
        thanks jesse

        I am using calculate on bar close= true

        and nothing has changed from parameters in backtest to real time.

        Today I ran strat on sim GC 2-17 and it was trading 1 contract perfectly all day until about 2:40 PM EST..as you can see on the attached screenshot of my chart. The ellipses highlight the multiple contract issue.
        Attached Files

        Comment


          #5
          Hello,

          Thank you for the reply.

          This could certainly be logic related, without seeing the syntax and logic used it would be hard to say what would be expected of the script.

          Could you provide a sample of the logic you are currently using? This would likely help to understand the outcome in the image better.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by terofs, Yesterday, 04:18 PM
          1 response
          21 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by CommonWhale, Today, 09:55 AM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by Gerik, Today, 09:40 AM
          2 responses
          7 views
          0 likes
          Last Post Gerik
          by Gerik
           
          Started by RookieTrader, Today, 09:37 AM
          2 responses
          13 views
          0 likes
          Last Post RookieTrader  
          Started by alifarahani, Today, 09:40 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X