Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to make a ban on opening?

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

    How to make a ban on opening?

    Writing strategy through StrategyWizard.
    Put a simple condition - Long more EMA and shorts less EMA and close by TrailStop.
    But the position is closed not only to TrailStop, but when performed opposite condition - if have open Long and fulfillment of the terms "less EMA" - Long then close and open shorts.
    How to do that would not open until closed by TrailStop?

    #2
    Hi turalex,

    If you want to ensure that the order has been exited before placing a new order, check that the market position is flat.

    Add a condition to each condition set.
    On the left of the condition builder select Strategy -> Market Position.
    On the right side of the condition builder select Strategy -> Flat.
    This should make a condition:
    Position.MarketPosition == MarketPosition.Flat in the condition set.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      its work!
      Thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by pechtri, 06-22-2023, 02:31 AM
      9 responses
      122 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by frankthearm, 04-18-2024, 09:08 AM
      16 responses
      65 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by habeebft, Today, 01:18 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by benmarkal, Today, 12:52 PM
      2 responses
      13 views
      0 likes
      Last Post benmarkal  
      Started by f.saeidi, Today, 01:38 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X