Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

entry and exit within same bar

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

    entry and exit within same bar

    Hi,

    Lets say there is a long red bar. My long entry order price is at the bottom of the bar and and profit target is at the top of the bar.

    Ninjatrader is showing this as a profitable trade. Is there any way around this?

    Thanks

    #2
    Mayham, the only way around this is to backtest NinjaScript Strategies with an intrabar granularity.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Im looking at that example, and I still can't figure out how to exit at the end of a bar. As far as I can tell it doesn't give an example of any exit orders. Maybe you could give an example on how to close an order before the market closes on a daily timeframe?

      Comment


        #4
        PCtrade, welcome to our forums - Austin's link would help you on this, too as you have access to finer timestamps by adding also a more granular dataseries than your daily, for example a minute one. Then you can check for time being greater that your exit time and ExitLong / ExitShort your open positions then...
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I am working with the multi time coding, but whenever I do it and add a period type of one minute, it is messing up my conditions for my entry and skipping over conditions that met before

          Comment


            #6
            nevermind I figured it out with a custom fill type I just made! I don't have to use multi-time so it backtests nice and quick

            Comment


              #7
              Hi,

              What code would I add to the Liberal fill type algorithm so that it does the following:

              "Do not fill target order for same bar as entry order"

              Thanks

              Comment


                #8
                mayham, while custom coding fill types is possible, we unfortunately do not offer support for this.

                As workaround you could add a BarsSinceEntry to your strategy before you activate the exits...

                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by trilliantrader, Today, 08:16 AM
                0 responses
                3 views
                0 likes
                Last Post trilliantrader  
                Started by AttiM, 02-14-2024, 05:20 PM
                9 responses
                174 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by funk10101, Today, 08:14 AM
                0 responses
                2 views
                0 likes
                Last Post funk10101  
                Started by adeelshahzad, Today, 03:54 AM
                1 response
                13 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by RookieTrader, Today, 07:41 AM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X