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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X