Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting Stop Limit Order

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

    Backtesting Stop Limit Order

    Hello Support,

    is it in Backtesting possible to place a fake stop Limit order at a certain price in the middle of a bar?
    e.g. Day Bar: H:100 O:90 C:95 L:85
    What if I want to go Long at 93? Next Bar opens at 98 and will not touch 93 again.

    It works with Exit Orders (SetStopLoss and SetProfit Target) but I find no way for doing this if I want to enter a trade. Stop Limit Order will work only if the price is inside the next Bar. But if not, it will ignore the order

    Thank's

    #2
    starcd, why would it ignore the order? Because it's expired? Did you check via the TraceOrders output?



    Per default the order would only last one bar, you can either resubmit or set them to liveUntilCancelled though in the overload and then cancel later if not needed anymore.

    Comment


      #3
      It's not a live order. As I mentioned it is Backtesting.

      Comment


        #4
        Right, those would be expiring as well on the next bar update if you would not resubmit or send via liveUntilCancelled. I would suggest checking via TraceOrders what order event sequence you're getting here.

        Comment


          #5
          Hi Bertrand,

          I'm getting this:

          05.08.2011 22:00:00 Entered internal PlaceOrder() method at 05.08.2011 22:00:00: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=1 LimitPrice=6991,5 StopPrice=6991,5 SignalName='Short' FromEntrySignal=''
          05.08.2011 22:00:00 Ignored PlaceOrder() method at 05.08.2011 22:00:00: Action=SellShort OrderType=StopLimit Quantity=1 LimitPrice=6991,5 StopPrice=6991,5 SignalName=Short' FromEntrySignal='' Reason='Invalid order price, please see log tab'

          The Bar was O:7254 H:7288 L:6222 C:6263 . The stopLimit order was at 6991,5. My Question is:
          Is it possible to programm a fake order for backtesting with the strategy analyser?

          Comment


            #6
            Thanks, I see. I would then suggest to submit your order against a finer series in backtesting, so the resolution needed would be present.

            You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by

            Comment


              #7
              I know. I wanted to avoid that..
              Are there planes implement this type of fake orders in future releases? I had a trading software called "tradesignal" before, that was able to do that...

              Comment


                #8
                Thanks. Yes, there are plans to simplify and enhance back-testing scenarios that would require more intrabar granularity. I will make sure your request for it is noted on our product development tracking lists.

                Comment


                  #9
                  Originally posted by starcd View Post
                  I know. I wanted to avoid that..
                  Are there planes implement this type of fake orders in future releases? I had a trading software called "tradesignal" before, that was able to do that...
                  Hie over to BMT and watch Ray's webinars on NT8. He pretty much describes what you (and another gazillion of us developers), are requesting.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  637 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  366 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  107 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  569 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  571 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X