Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting strategy doesn't yield enough entries

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

    Backtesting strategy doesn't yield enough entries

    Hello. I am new to NT and trading in general. I have taken a few weeks to acclimatize myself with the NT environment, but I am needing a little nudge if it is at all possible. I have created a strategy. I am using the free Kinetic EOD data and want to backtest my strategy. I will try to simplify the idea here: when the current days high is less than yesterdays high, and the current days low is less than yesterdays low, and yesterdays high is less than the 2 days ago high, and yesterdays low is less than the 2 days ago low, enter a short stop order when the price gets above todays high. It should stop out when it gets below yesterdays low. This is what my conditions and actions look like thus far:

    High[0]>High[1]
    Low[0]>Low[1]
    High[1]<High[2]
    Low[1]<Low[2]

    EnterShortStop(1,Low[1],"TestEntry")

    I connect to the Kinetic EOD before starting. When backtesting, I set type to Day, Value 1, From 9/1/2011 to 1/26/2012 (today), leaving the rest of the values at default.

    I find several problems:
    1) I am not sure how to tell it to enter above todays High.
    2) When I back test this against 4 months worth of data, I never get more than 1 entry (which is incorrect), though I see that the conditions are met many times during that period and it doesn't exit (stop) until today's date.

    I will apologize in advancefor my ignorance, and thank you in advance for any help and/or guidance.

    - Jim

    #2
    Originally posted by JimTrader75 View Post
    Hello. I am new to NT and trading in general. I have taken a few weeks to acclimatize myself with the NT environment, but I am needing a little nudge if it is at all possible. I have created a strategy. I am using the free Kinetic EOD data and want to backtest my strategy. I will try to simplify the idea here: when the current days high is less than yesterdays high, and the current days low is less than yesterdays low, and yesterdays high is less than the 2 days ago high, and yesterdays low is less than the 2 days ago low, enter a short stop order when the price gets above todays high. It should stop out when it gets below yesterdays low. This is what my conditions and actions look like thus far:

    High[0]>High[1]
    Low[0]>Low[1]
    High[1]<High[2]
    Low[1]<Low[2]

    EnterShortStop(1,Low[1],"TestEntry")

    I connect to the Kinetic EOD before starting. When backtesting, I set type to Day, Value 1, From 9/1/2011 to 1/26/2012 (today), leaving the rest of the values at default.

    I find several problems:
    1) I am not sure how to tell it to enter above todays High.
    2) When I back test this against 4 months worth of data, I never get more than 1 entry (which is incorrect), though I see that the conditions are met many times during that period and it doesn't exit (stop) until today's date.

    I will apologize in advancefor my ignorance, and thank you in advance for any help and/or guidance.

    - Jim
    You have not specified any Exits, so you will have one entry and never exit. You need to specify some means of exiting the trade.

    Comment


      #3
      Oh, I thought the second parameter (stop price - in this case "Low[1]") in the EnterShortStop would be the "exit". Btw, I am using the Strategy wizard. I am also actually a c# programmer by trade (one of the reasons I liked NT vs other packages), so if I have to edit the code, that will be fine. Again, forgive my ignorance if this sounds stupid.

      - Jim

      Comment


        #4
        Originally posted by JimTrader75 View Post
        Oh, I thought the second parameter (stop price - in this case "Low[1]") in the EnterShortStop would be the "exit". Btw, I am using the Strategy wizard. I am also actually a c# programmer by trade (one of the reasons I liked NT vs other packages), so if I have to edit the code, that will be fine. Again, forgive my ignorance if this sounds stupid.

        - Jim
        When you enter with a EnterShortStop(), the Stop price is the trigger price to put you in with a Mar****rder.

        There are various methods for exiting trades. ExitShort(), SetStopLoss(), SetTrailStop(), and many others. Look them up in the documentation.

        ref: http://www.ninjatrader.com/support/h...er_methods.htm

        Comment


          #5
          That helped. I am getting more trades now, but the entries and exits still don't seem right. I'll keep plodding away and come back if I get completely stuck.

          Thanks!

          - Jim

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          666 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          377 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          110 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          575 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          580 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X