Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stoploss or not stoploss

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

    stoploss or not stoploss

    Hello,

    I want to ask please about stoplosses from atm (chart-trader).

    What is the situation with a trailstop (or stop with moving in steps in atm) when internet-connection was frozen and during this outage the stoploss was triggered and position is flat on exchange. What might be the actions then in NinjaTrader when internet connection is working again? Does the atm "believe" it has to move the stoploss (or the trailstop) when price is certain ticks in profit that would cause the stop to move? Can this "stopmove" send a new stoploss (or trailstop) that works then as an entry order once it is triggered so that there is a new position?

    I hope I could translate correctly what I mean (the question is not about trailstop, I know that trailstop is not working when connection is lost).

    Thank you!
    Tony​

    #2
    Hello, thanks for writing in. Once the internet connection is re-established the trailing stop would be able to move again on the server side. If the stop is moved while the internet connection is lost, the stop will not be updated and not moved on the client side either. Once the internet is re-established and the price is above the profit trigger the stop would be moved.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. Yes, this is clear but doesnt refer to my question. Sorry if caused misunderstanding from inaccurate translation maybe.
      The question is if the stop is moved after connection is re-established because on my computer there is a position but it is not anymore on the exchange as it was closed during the internet outage.

      Same when moving a stoploss in a script-strategy when certain conditions are true (eg price 20 ticks in profit or any condition by an indicator is true) with
      "if(conditions ...)
      {SetStopLoss("rL1a", CalculationMode.Price, Lows[1][0]-3**TickSize, false);}

      so if there is no position because it was closed during internet outage will this code submit a new SetStopLoss even when there is no position anymore? (because if so then this might work as a new entry order, no?)

      I hope I could explain now what its about.

      Thank you!
      Tony

      Comment


        #4
        Hi, SetStopLoss requires OnBarUpdate to be called in order to activate or be moved, so if there is an internet disconnection, OnBarUpdate will not be called (or wherever SetStopLoss is being called from). If the position is closed and the strategy was managing that position, the strategy will not submit any stop orders because it needs an entry order to submit the stop loss in the first place.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hi,

          this is clear !

          When internet connection is off then there is no OnBarUpdate. Sure thing.
          And when everything is fine then of course it is as you write and there would not be a question about.

          Again: when internet connection is re-established there might be a position running in NinjaTrader but on exchange it is not because on exchange position closed in the meantime.
          So with - whatever - bar in OnBarUpdate NinjaTrader will move the stoploss (with SetStopLoss or Trailstop) because there is a position in NinjaTrader.
          So there is an entry order and stopmove is submitted to exchange, and might be a new order. Yes?
          Last edited by tonynt; 04-11-2023, 06:24 AM. Reason: translation error

          Comment


            #6
            Hi, If the exit order fills on the exchange, there will be a callback to the platform notifying the position change once the internet connection is restored so the strategy would stay in sync with the account position.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by AaronKoRn, Today, 09:49 PM
            0 responses
            3 views
            0 likes
            Last Post AaronKoRn  
            Started by carnitron, Today, 08:42 PM
            0 responses
            8 views
            0 likes
            Last Post carnitron  
            Started by strategist007, Today, 07:51 PM
            0 responses
            9 views
            0 likes
            Last Post strategist007  
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,975 views
            3 likes
            Last Post jhudas88  
            Started by rbeckmann05, Today, 06:48 PM
            0 responses
            9 views
            0 likes
            Last Post rbeckmann05  
            Working...
            X