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

Using EnterLongStop with bar data?

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

    Using EnterLongStop with bar data?

    Hi,

    Up front, I don't think what I am asking makes sense but I'll ask anyway...

    I don't have tick data, only 1min bar data. I want to place buy entries on a move above the prior close but I don't want to wait until the next close price, I want to enter at market using EnterLongStop(). This leads to all sorts of potential outcomes depending on where my subsequent profit and loss targets are. If all three prices trade in the same candle who knows what happened without tick data. Is there anyway of building such a backtest using only 1min bar data?

    As a follow up question. If I am using 1min bar data and I enter on the close, this doesn't solve the problem of confusion if my profit target and stop loss prices are both touched in a subsequent candle. How is this confusion handled in a backtest?

    For those interested, this is a good post on splitting tasks between tick and bar close events:


    Cheers,
    darmbk.
    Last edited by darmbk; 02-07-2014, 03:26 AM.

    #2
    darmbk, your understanding is correct that for accurate backtesting you would need to best look inside the 1 min candle to reduce fill assumptions done, there would be no way to do this with the 1 min base data unfortunately. Perhaps test in Market Replay with COBC = false?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand,

      Just thinking about the second question, what would happen if both profit and stop loss prices were traded in a single candle when backtesting on bars rather than ticks?

      Thanks,
      darmbk.

      Comment


        #4
        Having generally a conservative approach, in this case the stop would be assumed to have hit using the default backtesting.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          For completeness, if I were to build a strategy that employed LongEntryStop() but was only backtest over 1min bars, then would it similarly be the case, for conservatism, that the backtest would run but that if all three stop (entry, profit and loss) prices were traded in a single candle that it would be assumed that the result was a losing trade. For some trades this may be ok because few candles will have this potential outcome.

          Finally then, what difference will CalculateOnBarClose = true/false make if I run a backtest over bar data?

          Many thanks,
          darmbk.
          Last edited by darmbk; 02-07-2014, 05:05 AM.

          Comment


            #6
            Thats correct, we're more concerned with not overstating performance. Your CalculateOnBarClose setting would not have any influence on historical data, it would be true at all times.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Barry Milan, Yesterday, 10:35 PM
            5 responses
            16 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by DanielSanMartin, Yesterday, 02:37 PM
            2 responses
            13 views
            0 likes
            Last Post DanielSanMartin  
            Started by DJ888, 04-16-2024, 06:09 PM
            4 responses
            12 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by terofs, Today, 04:18 PM
            0 responses
            11 views
            0 likes
            Last Post terofs
            by terofs
             
            Started by nandhumca, Today, 03:41 PM
            0 responses
            8 views
            0 likes
            Last Post nandhumca  
            Working...
            X