Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Check if last position was long or short!?

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

    Check if last position was long or short!?

    Hello,

    Could someone please tell me if it is possible to let my strategy check if the last position was long or short? I mean for exemple, before entering long let my strategy check if the last position was a short and only enter long if the condition is true??

    Thanks in advance!

    #2
    In 6.5 there is a TradeCollection object that can be checked. See the Help Guide. Otherwise, you would have to manage your own variable and set it to the last position etc...
    RayNinjaTrader Customer Service

    Comment


      #3
      last pos short/long

      Originally posted by whitegun View Post
      Hello,

      Could someone please tell me if it is possible to let my strategy check if the last position was long or short? I mean for exemple, before entering long let my strategy check if the last position was a short and only enter long if the condition is true??

      Thanks in advance!
      Is this still the case, or do we have a built-in mechanism to check whether last pos was long or short?

      thx

      Comment


        #4
        Hello,

        Thank you for the question.

        I wanted to further clarify this.

        Are you asking about what position the strategy is currently in or are you asking if you are currently flat, was was the position prior to becoming flat?

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Perr0Grande, Today, 08:16 PM
        0 responses
        2 views
        0 likes
        Last Post Perr0Grande  
        Started by elderan, Today, 08:03 PM
        0 responses
        5 views
        0 likes
        Last Post elderan
        by elderan
         
        Started by algospoke, Today, 06:40 PM
        0 responses
        10 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        12 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        7 views
        0 likes
        Last Post quantismo  
        Working...
        X