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

EnterLongStopMarket State

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

    EnterLongStopMarket State

    Hi

    I´m working on a strategy that if a certain parameter is met it enters a EnterLongStopMarket or EnterShortStopMarket for a period of bars at a certain number of ticks offset from the close of the bar, i want to know if there´s an state that can help me to avoid getting more signals while the EnterLongStopMarket or EnterShortStopMarket are placed, I already got to avoid signals while it is long or short with the MarketPosition.Long or short, but not the EnterLongStopMarket or EnterShortStopMarket when it´s submitted and it´s waiting to be touched.

    Thank you

    #2
    Hello henryd333,

    When the order is submitted is this being assigned to a variable in OnOrderUpdate()? Does the logic you want to suppress while the order is open have in the conditions that the order must not be null and in OrderState.Working or OrderState.Accepted?

    Below is a link to examples.
    https://ninjatrader.com/support/foru...269#post802269
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea

      This logic in onbarupdate. Does it need to be on Onorderupdate?

      Comment


        #4
        Hello henryd333,

        The order object updates from OnOrderUpdate and this is where you will need to assign this to a variable.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by lucascirax, Today, 06:21 AM
        0 responses
        1 view
        0 likes
        Last Post lucascirax  
        Started by Naouss, Today, 05:43 AM
        1 response
        12 views
        0 likes
        Last Post KonstantinosNT  
        Started by kainermy, Today, 05:22 AM
        0 responses
        10 views
        0 likes
        Last Post kainermy  
        Started by KlausTheMause, Yesterday, 02:57 PM
        1 response
        32 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by Jaggy, 02-04-2023, 07:24 PM
        1 response
        64 views
        0 likes
        Last Post NinjaTrader_Jason  
        Working...
        X