Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How To Enter Position Once On Rising ADX in Strategy Builder

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

    How To Enter Position Once On Rising ADX in Strategy Builder

    I am trying to find a way to build a simple strategy based on 'rising' adx' in the Strategy Builder when a set of conditions are met. For example, when price closes above 50 period ema and 200 period ema, and rising adx. I want to enter long when adx begins to rise, but it enters long on every bars meeting these conditions, I just want to enter "once" when adx begins to rise, not on every bar, but I cannot figure out how. Can someone help me. Thanks.
    Last edited by timwey; 10-07-2024, 05:38 AM.

    #2
    Hi Timwey,

    You can use a variable named 'count,' with a default value of 0.
    When the ADX starts to increase and the 'count' variable is 0, execute the command and increment the 'count' variable by 1.
    When the ADX decreases, reset the 'count' variable to 0.
    I hope this helps solve your problem.

    Regards,
    William
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      Thank you for your advice, William, I figured it out.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      50 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      69 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X