Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need help with: If X has not happened within n periods ago... do Z? Any thoughts?

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

    Need help with: If X has not happened within n periods ago... do Z? Any thoughts?

    Hello all... I'm working on a strategy (in the strategy wizard), which requires for a check to be run on a perticular crossover state. Basically, here is the trade logic:

    "If ADX did not cross below 20 within the last [n] bars... enter long..."

    I'm working in the strategy wizard, so this may not be possible from there... I'm able to do "bars ago," but I'm having trouble figuring out how to do "within the last [n] bars" Is this possible from within the wizard?

    V

    #2
    Hello,

    I have attached an image from the condition builder in the Wizard that I believe may be what you are looking for.

    I used the CrossBelow located in the Misc tab and check if the cross below is false for X amount of bars, if it is false the condition will be true so your code in the "Do the following" section would be executed.

    I selected "false" in the right side list from the Misc section.

    Please let me know if I may be of additional assistance.
    Attached Files

    Comment


      #3
      Perfect! Thanks, Jesse!

      -V

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      67 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      150 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      99 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X