Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simulated stop

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

    Simulated stop

    Hi there,

    My new approach (which I'll test out tomorrow) uses simulated sell on stops in place of submitted stop orders. I wanted to better understand how to configure this option in live trading.... it's working perfectly in backtesting, but I know things change.

    First question, is this document still valid?


    Back-up Live Stop Loss Orders

    NinjaTrader always submits back-up live stop loss orders when using a simulated stop loss order. This is primarily used for protecting an open position strategy in the event that you have PC or internet related problems. The back-up live stop stop loss order is submitted at an offset of 15 x the instrument's tick size from the simulated stop loss price and moves in relation to your current simulated stop loss value. Therefore, if your simulated stop loss is adjusted, the back-up live stop loss is also adjusted.
    I don't see that in the help docs inside Ninjatrader, only at the link above. Thought I'd verify.

    Second, other than calling the version of SetStopLoss that accepts simulated=true within my code... is there *anything* else I need to do within options/settings to enable simulated stop loss orders? Various documents talk about using simulated stops within the SuperDOM window, within ATM window... not much detail about Ninjascript Strategy.

    Thanks in advance.

    #2
    The reason there is no documentation for simulated stop for NinjaScript is because if you really want to simulate it you just code the sim logic manually. All you need to do is this:
    Code:
    if (Close[0] <= stopPrice)
         ExitLong();
    That simulates your stop. You can use CrossBelow as well if you think that works better. The moment the price drops below your stop you get a market order to close which is the same thing as a simulated stop.

    The above link is very old and may or may not be relevant anymore.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,

      Yes, but to get the same effect, don't I need to run on basically a per tick basis? And I didn't want to do that, not with 50+ symbols and charts running in parallel. I don't want to load my CPU running charts at frequencies I absolutely don't need.

      So, this is frustrating. Are simulated stops supported, or not? My new code uses the simulated stop. In back-testing, this code works perfectly. During live autotrading, I'm not seeing any indication there's a simulated stop in place... there's nothing in the "orders" tab that would suggest there is.

      Comment


        #4
        They definitely are supported heech. I have provided you with a couple of options to do what you want.

        1. SetStopLoss with simulated set to true.
        2. Running the simulation manually.



        You should see sim orders in the Initialized state.

        If you run it manually there are programming techniques you can take to separate out the logic that needs tick-by-tick processing and the logic that can be run bar-by-bar. This will alleviate your requirement.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          How do I set the value of the volume trigger in a strategy if I use SetStopLoss with simulated set to true?

          Comment


            #6
            Volume trigger is an ATM strategy concept. If you want to use this in NinjaScript you need to program it.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by samish18, Yesterday, 04:52 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Marble, Yesterday, 05:00 AM
            3 responses
            24 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Irukandji, Today, 04:05 AM
            0 responses
            12 views
            0 likes
            Last Post Irukandji  
            Started by TrippTraders, Yesterday, 07:12 PM
            3 responses
            9 views
            0 likes
            Last Post brucerobinson  
            Started by paulo_br, 09-13-2024, 08:41 AM
            8 responses
            1,160 views
            0 likes
            Last Post AppleID25  
            Working...
            X