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

question on backtesting a strategy

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

    question on backtesting a strategy

    I was wondering if say...

    I have intraday data for ES on two days... 11/1/07 and 11/2/07

    and I run a backtest that at 1:03am, type a message in the output box ("hello ")...

    if there is volume on every minute on these two days except on 11/2/07 there is "zero" volume at 1:03am...

    in the output box....should it display the below?

    hello hello

    or just

    hello


    I'm trying to figure out if it will execute a function at a time when there is no volume...
    thanks in advance

    #2
    Not sure I follow. If an any particular minute there is not volume, then there will be no 1 minute bar for this minute meaning OnBarUpdate would not be triggered.

    Comment


      #3
      Interesting...

      in real trading, if I wanted to put in a long position at about 1:03am but there is no volume at that time..naturally, the market would force the order within a minute or so depending if there is someone willing to sell...but sooner or later, the order should go through

      to simulate this in Ninjatrader, are you saying that instead of using the == sign, do i use the >= instead? As in the code below?

      am I suppose to write the code
      if (TimeTo[0] >= 10300)
      EnterLong();


      I would think that >= means putting in a long position "every" minute "on or after" 1:03am which would certainly give the program a tumor...


      Originally posted by NinjaTrader_Dierk View Post
      Not sure I follow. If an any particular minute there is not volume, then there will be no 1 minute bar for this minute meaning OnBarUpdate would not be triggered.

      Comment


        #4
        >> do i use the >= instead?
        Right that would be an option.

        Comment


          #5
          but logically, shouldn't >= cause the function to go long "every" minute after 1:03am which should cause the program to go crazy?
          Originally posted by NinjaTrader_Dierk View Post
          >> do i use the >= instead?
          Right that would be an option.

          Comment


            #6
            Please make sure you understand the concept of entry signals in NT: http://www.ninjatrader-support.com/H...verview36.html

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by businessman1929, 04-29-2024, 01:28 PM
            2 responses
            21 views
            0 likes
            Last Post businessman1929  
            Started by bltdavid, 03-27-2023, 05:32 AM
            18 responses
            346 views
            0 likes
            Last Post ETFVoyageur  
            Started by NM_eFe, Today, 05:15 PM
            0 responses
            4 views
            0 likes
            Last Post NM_eFe
            by NM_eFe
             
            Started by vitaly_p, Today, 05:09 PM
            0 responses
            4 views
            0 likes
            Last Post vitaly_p  
            Started by cmtjoancolmenero, Today, 05:05 PM
            0 responses
            2 views
            0 likes
            Last Post cmtjoancolmenero  
            Working...
            X