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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        59 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        283 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X