Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry and Exit simultaneously

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

    Entry and Exit simultaneously

    I am running a signal to signal strategy and need knowledge on how to code the strategy that enters and exits at the same time on the candle after trigger candle. I can work in unlocked code if necessary.

    Currently the exits are perfect but getting the entries around the same price doesn't work using default coding from strategy builder

    #2
    Hello Teebone21,

    Thank you for your post.

    Are you trying to reverse a position?
    Or, are you trying to maintain long and short positions at the same time?

    If you want to reverse a position, you can call EnterLong when Position.MarketPosition == MarketPosition.Short, or EnterShort when Position.MarketPosition == MarketPosition.Long. In the managed approach NinjaTrader will automatically send a 'Close position' order to close the existing position before sending the new entry in the opposite direction.

    Here is a Help Guide link about using EnterLong() - https://ninjatrader.com/support/help.../enterlong.htm
    Also, here is a Help Guide link about using EnterShort() - https://ninjatrader.com/support/help...entershort.htm

    If you are trying to have both long and short positions at the same time, you would need to use 2 accounts as NinjaTrader does not support having long and short positions simultaneously on the same account.

    I look forward to further assisting.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_BrandonH View Post
      Hello Teebone21,

      Thank you for your post.

      Are you trying to reverse a position?
      Or, are you trying to maintain long and short positions at the same time?

      If you want to reverse a position, you can call EnterLong when Position.MarketPosition == MarketPosition.Short, or EnterShort when Position.MarketPosition == MarketPosition.Long. In the managed approach NinjaTrader will automatically send a 'Close position' order to close the existing position before sending the new entry in the opposite direction.

      Here is a Help Guide link about using EnterLong() - https://ninjatrader.com/support/help.../enterlong.htm
      Also, here is a Help Guide link about using EnterShort() - https://ninjatrader.com/support/help...entershort.htm

      If you are trying to have both long and short positions at the same time, you would need to use 2 accounts as NinjaTrader does not support having long and short positions simultaneously on the same account.

      I look forward to further assisting.
      I am trying to reverse a position using one account.. Thanks for insight!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by JTizz, Today, 01:20 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by omermirza, Today, 12:39 PM
      2 responses
      11 views
      0 likes
      Last Post omermirza  
      Started by mballagan, Today, 01:02 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by larkmail, Today, 12:30 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by Danila, Today, 11:08 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X