Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set position to occur only once

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

    Set position to occur only once

    I just purchased the NT7 license and now trying to write a strategy, so I'm really a newbie here and would like some help.

    I am trying to incorporate the MACD > average into my system with a very small profit taking.

    For example, if trigger happens and I take a position and get a profit, I would like to stop the strategy until another trigger happens. Currently, even if I take a profit, the strategy would still take up another position, until my stop loss.

    I understand its because of the strategy, MACD > average. How do I arrange it so that it would only occur once per direction or until another trigger occurs instead of multiple positions per trigger.

    #2
    Have you unlocked the code and are editing the strategy?

    Searching on "once per direction" returns some previously discussed tips that should prove useful:

    Comment


      #3
      plusactive, thanks for the post and for aquiring a license. I would express the entry via a CrossOver rule and not just checking if the MACD value is greater than your average, since that could be true for a consecutive number of bars, which means if you're out with the profit the entry conditions would allow for another entry of the same signal, which would then happen. With the CrossAbove rule you would only have an entry on the cross point for the two values, so if you're exits have triggered it will wait for another occurrence.

      Handling a CrossOver condition would be shown in the 7th section on this link in our online documentation - https://www.ninjatrader.com/support/...on_builder.htm

      All the best,

      Comment


        #4
        Thanks Bertrand. I've tried the crossover and it did only take one entry. However, I have included another condition to exceed a certain % before the buy is triggered. This is where the whole problem started, as it meets both the conditions, hence the multiple entries.

        Thanks Sledge. I'm looking through your link and it seems to match my requirements. Will try out some suggestions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        23 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        20 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        10 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        41 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X