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 Segwin, 05-07-2018, 02:15 PM
                10 responses
                1,769 views
                0 likes
                Last Post Leafcutter  
                Started by Rapine Heihei, 04-23-2024, 07:51 PM
                2 responses
                30 views
                0 likes
                Last Post Max238
                by Max238
                 
                Started by Shansen, 08-30-2019, 10:18 PM
                24 responses
                943 views
                0 likes
                Last Post spwizard  
                Started by Max238, Today, 01:28 AM
                0 responses
                10 views
                0 likes
                Last Post Max238
                by Max238
                 
                Started by rocketman7, Today, 01:00 AM
                0 responses
                7 views
                0 likes
                Last Post rocketman7  
                Working...
                X