Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

More than 1 Active Position

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

    More than 1 Active Position

    My strategy takes a while to take profit because of the conditions that has to be met. But I want to continue to enter into trades if the conditions are correct, a max of 3 open positions.

    Right now the strategy wont take any trades until the first trade's condition is met.

    I tried to change "Entries per direction" to 3 but all that did was enter 3 positions on the first time that conditions were met.
    "Entry handling" is currently on All Entries.

    Help?

    Thanks!

    #2
    Hello Ousher,

    Thanks for your post.

    If I understand correctly, you are saying that with entries per direction set to 3 that on the first entry condition, it places 3 orders and your expectation is that it would place 1 order and then sometime later if the same conditions are true again place a 2nd and then again a 3rd order?

    Are the 3 entries currently being made on the same bar?

    What is the Calculate setting used? (Calculate.OnBarClose, Calculate.OnPriceChange, or Calculate.OnEachTick).

    Are you testing on live data, historical data on the chart, historical data on the strategy analyzer, or playback with market replay data?

    Does your script access additional data series? (if so please identify)

    Are you using the Strategy Builder or the Ninjascript editor?

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello Ousher,

      Thanks for your post.

      If I understand correctly, you are saying that with entries per direction set to 3 that on the first entry condition, it places 3 orders and your expectation is that it would place 1 order and then sometime later if the same conditions are true again place a 2nd and then again a 3rd order?

      Are the 3 entries currently being made on the same bar?

      What is the Calculate setting used? (Calculate.OnBarClose, Calculate.OnPriceChange, or Calculate.OnEachTick).

      Are you testing on live data, historical data on the chart, historical data on the strategy analyzer, or playback with market replay data?

      Does your script access additional data series? (if so please identify)

      Are you using the Strategy Builder or the Ninjascript editor?
      Yes, that is my expectations.

      Yes, currently the 3 entries are happening on the same bar, should only be 1 entry for the bar.
      I am currently on OnPriceChange, testing on Playback with market replay.
      No additional data series
      And doing it through Strategy Builder.

      EDIT: Now that I'm looking at it, because im doing intra-bar calculations, seems like my conditions are being met more than once on the bar. Would a solution be to use Bars since entry?
      Last edited by Ousher; 12-02-2020, 08:59 AM.

      Comment


        #4
        Hello Ousher,

        Thanks for your reply.

        Correct, because of the OnPriceChange setting, your entry conditions are true multiple times in a bar.

        You can limit the entry to once per bar by creating an int variable and call it EntryBar. In your entry set add a check to see if the EntryBar is NOT equal to the Misc>Current bar, so when that is true along with your other conditions the first order is placed. In the action of that set add the action to set EntryBar to Misc>Current bar This will set the entry condition false after the first order and it will not be true again until you are in a new bar and your other entry conditions are also true again.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sidlercom80, Today, 02:40 AM
        0 responses
        1 view
        0 likes
        Last Post sidlercom80  
        Started by b16_aln, Today, 01:52 AM
        0 responses
        6 views
        0 likes
        Last Post b16_aln
        by b16_aln
         
        Started by junkone, Yesterday, 08:55 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by adaeiqendqw, 01-16-2021, 02:56 AM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by [email protected], Yesterday, 06:10 PM
        5 responses
        16 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Working...
        X