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

Backtestig Day Trading systems

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

    Backtestig Day Trading systems

    Hi,

    I want ask you how can I test my day trading strategies?
    This is for my most important if I have script where is:
    if (Close[0] > Open[0] + 20) then buy
    that strategy analyser wan't open new position by next open bar but will it open by the current bar.It is possible?
    Thanks.

    VB

    #2
    Unfortunately that is the nature of backtesting. Because you already know the Close of the bar you wish to trade at you cannot possibly trade at that bar. The next available time to trade after you determine to enter is the next bar. There is no way around this issue.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks!
      I'm understand.

      Comment


        #4
        I know, that is probably late, however, it could help if you on previous bar close do an action: EnterLongStop(DefaultQuantity, Close[0]+20*TickSize,"")

        Comment


          #5
          Thank you very much for your help!I made all combinations (close(1)close(0)open(0)open(1) etc..)but isn´t working.I want go to position on the bar where are the conditions true.Not next bar.An example if I have daily trading strategy and I want entry and exit at the same day then for today I haven´t idea how can I make it..?And this is the problem what I have.How test daily models?If you have some ideas I will be very hapy when you can help me.

          VB

          Comment


            #6
            VB,

            This is the nature of backtesting. You cannot trade on the signal bar simply because that bar has already closed. You have the Close price of the bar and all your calculations are based on that close price, but since you already have the close you cannot trade on that bar.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              You can entry in the same bar in the case you will use EnterLongStop() method, however if you are not experienced programer it will bring you problems with order handling rules.

              Originally posted by linzvb View Post
              Hi,

              I want ask you how can I test my day trading strategies?
              This is for my most important if I have script where is:
              if (Close[0] > Open[0] + 20) then buy
              that strategy analyser wan't open new position by next open bar but will it open by the current bar.It is possible?
              Thanks.

              VB

              Comment


                #8
                Hello,

                Here are some simple and profitable strategies to test for those who are interested:

                - [REDACTED]

                - [REDACTED]

                - [REDACTED]

                - [REDACTED]

                - [REDACTED]
                ​​
                Last edited by NinjaTrader_Emily; 08-01-2023, 08:56 AM. Reason: removing promotional 3rd party links

                Comment


                  #9
                  Hello daraj,

                  Thank you for your post.

                  We appreciate your willingness to chime in and contribute to the support forum, although promotional 3rd party links are not allowed on our forum. I have removed the links from your post.

                  Thank you for your understanding.
                  Emily C.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by DJ888, Today, 10:57 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by MacDad, 02-25-2024, 11:48 PM
                  7 responses
                  158 views
                  0 likes
                  Last Post loganjarosz123  
                  Started by Belfortbucks, Today, 09:29 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post Belfortbucks  
                  Started by zstheorist, Today, 07:52 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post zstheorist  
                  Started by pmachiraju, 11-01-2023, 04:46 AM
                  8 responses
                  151 views
                  0 likes
                  Last Post rehmans
                  by rehmans
                   
                  Working...
                  X