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 argusthome, 03-08-2026, 10:06 AM
          0 responses
          68 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          41 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          24 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          27 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          54 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X