Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Take Profits and Stoplosses based on Bid and ask ticks in Strategy Analyzer?

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

    Take Profits and Stoplosses based on Bid and ask ticks in Strategy Analyzer?

    Are Take Profits and Stoplosses based on Bid Ticks and Ask Ticks in Strategy Analyzer?

    If so, will it use Bid ticks and Ask Ticks that happened both on last Ticks and in between Last Ticks?

    This is in regards to using the Strategy Analyzer for backtesting and optimization.

    Thanks!

    #2
    Hello Matheyas5,

    Thank you for your note.

    The executions are not based on Bid or ASk in the Strategy Analyzer over historical data. This is due to the fact that the historical bar only has the Open, High, Low, and Close and not each tick that built the bar.

    If you want to simulate intra-bar fills you can review the sample at the following link: http://ninjatrader.com/support/forum...ead.php?t=6652

    Comment


      #3
      Hmm,

      Would everything start in synch if during a backtest (and optimization) my strategy was running on a 5 min chart but was sending according orders to a 1 Tick Bid chart and a 1 Tick Ask chart?

      Comment


        #4
        Yes, as long as the data is present for the needed series.

        Comment


          #5
          Hi Patrick, do you happen to have any links to code samples that show how to plot multiple time series on a chart within the Strategy Analyzer when backtesting and optimizing?

          (This link you sent http://ninjatrader.com/support/forum...ead.php?t=6652 is great , but it only shows how to references multiple time series and not plot them.)

          I ask because i'm looking to figure out how to plot 1 tick Ask bars and 1 tick Bid bars alongside 5 minute
          Last bars on a chart when running a backtest and optimization in the Strategy Analyzer.

          Thanks!

          Comment


            #6
            Hello Matheyas5,

            That would require creating several plots or overriding Plot and creating your own bars. There is no way to directly add a bar series to the chart through a strategy or indicator.
            Last edited by NinjaTrader_PatrickH; 01-27-2016, 09:52 AM.

            Comment


              #7
              Can 1 tick Ask bars, 1 tick Bid bars and 5 minute last bars all be plotted at the same time in the Strategy Analyzer's chart if I have plotted them all accordingly within my strategy's Ninjascript code?

              I think the answer is yes (based on your previous answer) but i just wanted to confirm before I try coding this.

              Thanks!

              Comment


                #8
                Hello Matheyas5,

                The strategy cannot add bar series to the chart display. Using plots you could create your own plots from an indicator to display the values.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by alifarahani, Today, 09:40 AM
                6 responses
                36 views
                0 likes
                Last Post alifarahani  
                Started by Waxavi, Today, 02:10 AM
                1 response
                17 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by Kaledus, Today, 01:29 PM
                5 responses
                14 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by Waxavi, Today, 02:00 AM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by gentlebenthebear, Today, 01:30 AM
                3 responses
                17 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X