Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy and marketposition

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

    Strategy and marketposition

    Does Position.MarketPosition return what the strategy thinks the position is or does it read the position from the TWS?

    #2
    Strategy Position. Please see the following Tip - http://www.ninjatrader-support.com/v...ead.php?t=4033
    RayNinjaTrader Customer Service

    Comment


      #3
      A somewhat related question:
      I haven't programmed anything in a long time, so I'm refreshing all this while learning C# and NS... so I'm still just testing out on sim accounts at the moment.
      If my strategy only enters a trade when MarketPosition is flat, is it possible to for example, open 2 different charts, and have the same strategy run simultaneously on two different time frames of the same market (ie, both 1 and 5 min ES). Or will MarketPosition for the 1 min time frame return Long when a Long is taken on the 5 min time frame and thus not be able to take 2 trades at the same time on different time frames? Or do the strategy positions not overlap being as they are run separately?

      On a different note: I want my trade entry to be based only on Bar Close. If the entry is based on an indicator that only updates on Bar Close, is it then possible to run the Script with Update on Bar Close false, so that I can update the stop loss intra-bar, but the entry should still remain only based on bar close due to the indicator's settings that are part of the entry trigger?

      Thanks

      Comment


        #4
        Yes you can run strategies on the same market on an infinite number of charts. The strategy positions do not overlap. They are unique for each instance of a running strategy.

        Indicators called within a strategy will inherit the CalculateOnBarClose property from the running strategy. Should you wish to run your strategy tick by tick but only take signals on the close of the bar, use the following property.



        Keep in mind, during a backtest, strategies are only evaluated at the close of a bar.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        568 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        548 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X