Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

capture Strategy position ENTRY by bar

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

    capture Strategy position ENTRY by bar

    in Strategy Wizard 'Condition and action' how can I determine when (current bar at close) the Strategy Action actualy 'Do' /Order management - Enter long position ?? I did try 'Define user variable' but this works as a toggle that once triped is always until reset.

    #2
    Not sure I follow with what you are trying to do. To mark the bar your EnterLong() order was submitted you would could set a variable to something the same time your order is submitted.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh
      I did use the Strategy Action to set a variable..trouble is the variable works as a toggle so "When following conditions are true", bar#5, to Enter long, on bar #6, the variable starts the value assigned in the 'define user variable' in "Do the following". However, because of the toggle action, the variable persists to bar #6,7,8,9,... until/if the variable is ever changed by another command.
      Goal: In Strategy I have constructed 9 different sets that will 'Enter long'. What I am need to do is construct set#10 to 'Exit long' on only the very bar ,#7, following an 'Enter long' execution, bar#6, in a "stop run/head fake" scenario. (This scenario is easy to identify and extremely accurate, so saves a lot of pain in the stop loss area.) The Strategy is set to only be in one position at a time so I do not want/need to know "When following conditions" support 'Enter long' ; I need to define the actual bar the Strategy actually did 'Enter long',#6, so can/will only auto 'Exit long' on bar#7, if set#10 conditions form during bar#6, the actual bar of entry. FYI I am 'calculate on bar close' on tick data so is too fast for proper manual exit

      Comment


        #4
        Condition Builder / Strategy / Current position size: add bar enumerator

        this is one thought . In the Condition Builder , In the Strategy field: Add a bar enumerator to the "Current position size". This would alow testing to locate position size changes +or- relative to a particular bar pair. A wider application would be to support all the values in the 'Strategy' field with the parameter "bar"

        Comment


          #5
          I see what you want to do now. Instead of using a variable you can use "Bars since entry". In the top Condition Builder part, expand the "Misc" category and select "Bars since entry", select >, then on the right hand side expand "Misc" again and this time select "Numeric Value", set it to however many bars after entry you want it to be at.

          Then on the bottom select "Exit Long" as your action.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            This is great !!! However in "Misc" I only have the fields: *Default input series *Numeric value . my Ninja Trader is version: 6.0.1000.9 (Live)
            Is this in the new 6.5 BETA ??

            Comment


              #7
              Indeed it is new to the Strategy Wizard in NT6.5 beta.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Thanks Josh !!
                Tell Ray Thanks !!
                Will dn ld BETTA .. YaHoo

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                579 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                334 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
                554 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                551 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X