Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple strategy on SRS - backtest/Wizard

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

    Simple strategy on SRS - backtest/Wizard

    Hi guys, I am trying to backtest a simple, but hopefully effective, strategy on the SRS, the double inverse real estate etf. I can’t get this to run properly on the Wizard, and I don’t have programming skills for the NinjaScript. The strategy is

    1.‘if yesterday’s candle is green – buy [today] at yesterday’s open +1.00’
    ‘if yesterday’s candle is red – buy [today] at yesterday’s close +1.00’

    2. ‘exit at a profit target of +1.00’
    ‘otherwise exit at today’s close’

    The idea to have the trade executed intraday, buying at the level of yesterday’s candle bottom.

    If any one happens to run the backtest out of curiosity, can you pls share the results with me, or suggestions for code/running this on Wizard (Wizard can’t seem to handle the intraday aspect of it properly).

    Thanks.

    Dan

    #2
    Dan,

    What you want to do is go to the Condition Builder. On the left side, select Close and then in Bars Ago type in 1. Then on the right side, select Open and also select Bars Ago 1. In the middle select >. Now in its action have it do a limit order with the limit price at yesterday's open.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh, thanks. The entry did work correctly, i.e. limit orders at bottom of prior day's candle body.

      The problem is with timing of exits. The idea is to exit intraday or sell at the closing price that day.

      The backtests I did keep showing exits with an interval of a day or more after the purchase, which is not the plan - should be same day.

      Why could that be? Is it because I am using Yahoo for historical quotes (i.e. only OCHL)?

      Comment


        #4
        Here is the script:

        // Condition set 1
        if (Open[1] < Close[1])
        {
        EnterLongLimit(
        100, Open[1] + 1, "");
        ExitLongLimit(Open[
        1] + 2, "", "");
        ExitLongLimit(Close[
        0], "", "");


        I attach the backtest chart. I can't figure out what's gone wrong with this, and not sure why it's showing what it's showing

        Agin, it should work INTRADAY - entry at yesterday's candle bottom +1.00, and same-day exit at a profit target of +1.00. Otherwise exit at close.

        Thanks
        Attached Files

        Comment


          #5
          Hi Dan, unfortunately this is expected in the wizard - you could enter the profit target in the 'Stops and Targets' section in the wizard - http://www.ninjatrader-support.com/H...egyWizard5.png This would then execute intrabar.

          Comment


            #6
            ok thanks guys

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X