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.
    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 XXtrader, Yesterday, 11:30 PM
        2 responses
        11 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        6 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        11 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        7 views
        0 likes
        Last Post elirion
        by elirion
         
        Working...
        X