Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

SetStopLoss() overnight

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

    SetStopLoss() overnight

    Hi there,
    i developed a strategy which operates on a daily timeframe on a european market.
    I use the SetStopLoss() command to set my exit level, if i open a position which stays open overnight, in the morning before the market opens i get my stoploss canceled and this line in my log:

    6/20/2012 6:38:08 AM,Order,Order='173064694/DU117982' Name='Stop loss' New state=Unknown Instrument='FGBL 09-12' Action=BuyToCover Limit price=0 Stop price=141.55 Quantity=18 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='',

    is there something i'm missing to keep my stop levels valid overnight?
    Thank you, kind regards.

    #2
    Hello barbra streisand,
    Please set the TimeInForce parameter to Gtc from the strategy parameters box so that the orders dont gets cancelled after the end of the day.



    Please let me know if I can assist you any further.
    Attached Files
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hello Joydeep,
      thank you for your reply, unfortunately strategy's TimeInForce is already set to Gtc.
      I use IB as broker, is it possible they don't support Gtc orders?
      Thank you.

      Comment


        #4
        Hello barbra streisand,
        Can you please check if Trigger After hours is checked or not in your Account connection
        • In Control Center menu bar goto Tools>Account Connections..
        • In the Account Connection dialog select your IB account connection and click on the Change button
        • In the Connection Options dialog click Next, Next,


        Please let me know if Trigger After Hours is checked or not.

        I look forward to assisting you further.
        Attached Files
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Hello,
          yes, Trigger After Hours is checked already.

          Comment


            #6
            Hello barbra streisand,
            Please uncheck Trigger After Hour in the account connection.

            Also please make sure to uncheck “Allow triggering outside of regular trading hours” in TWS
            (Configure > Order > Stop Trigger Method menu).


            Please let me know if I can assist you any further.
            JoydeepNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            939 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            8 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by rocketman7, Today, 01:00 AM
            0 responses
            4 views
            0 likes
            Last Post rocketman7  
            Started by wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            28 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, 02-22-2024, 01:11 AM
            5 responses
            33 views
            0 likes
            Last Post wzgy0920  
            Working...
            X