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 usazencort, Today, 01:16 AM
            0 responses
            1 view
            0 likes
            Last Post usazencort  
            Started by kaywai, 09-01-2023, 08:44 PM
            5 responses
            603 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            6 responses
            22 views
            0 likes
            Last Post xiinteractive  
            Started by Pattontje, Yesterday, 02:10 PM
            2 responses
            21 views
            0 likes
            Last Post Pattontje  
            Started by flybuzz, 04-21-2024, 04:07 PM
            17 responses
            230 views
            0 likes
            Last Post TradingLoss  
            Working...
            X