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 kaywai, 09-01-2023, 08:44 PM
                5 responses
                601 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
                19 views
                0 likes
                Last Post Pattontje  
                Started by flybuzz, 04-21-2024, 04:07 PM
                17 responses
                230 views
                0 likes
                Last Post TradingLoss  
                Started by agclub, 04-21-2024, 08:57 PM
                3 responses
                17 views
                0 likes
                Last Post TradingLoss  
                Working...
                X