Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting random entry

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

    Backtesting random entry

    Hi all, I'm looking to experiment with various reward:risk ratios and I'd like to backtest using 100 trade random entry samples.

    What would be the easiest way to tell NT I want to take 100 trades on this instrument over a particular time frame?

    #2
    Hi pkmurphys,

    To test various risk reward ratios is a good task for the optimizer. You can structure your risk /reward values as inputs to be used in targets/stop losses, and then the optimizer runs many backtests against the range of inputs you tell it to run on.

    If you want to randomize 100 entries, you could work with C# random function:
    Represents a pseudo-random number generator, which is an algorithm that produces a sequence of numbers that meet certain statistical requirements for randomness.


    Maybe using Random CurrentBar value as a trigger for entry.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      hi ryan,

      is there a way to get Strategy Wizard to take 100 random trades? i don't have any programming experience

      Comment


        #4
        To take advantage of that random function would require working with code. With the strategy wizard, you'll have to define the conditions for entry using the condition builder, so they can't be random in the same sense. You could make basic conditions like Open[0] == Close[0] or crossovers just to get some entries made.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          yup, generating some crossovers and running them through the optimizer is pretty close to what i'm after, thanks for the suggestions.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, Yesterday, 11:51 AM
          0 responses
          16 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, Yesterday, 11:48 AM
          0 responses
          21 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-25-2026, 09:53 PM
          0 responses
          16 views
          0 likes
          Last Post CaptainJack  
          Started by CaptainJack, 03-25-2026, 09:51 PM
          0 responses
          13 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 03-23-2026, 11:13 AM
          0 responses
          19 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X