Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to say: EMA fast "has not crossed" EMA slower during the last n bars

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

    How to say: EMA fast "has not crossed" EMA slower during the last n bars

    I'm writing a strategy about a moving average cross that includes a criteria that the cross happens after a steady course of action in the opposite direction.
    In the strategy builder, I'm writing the lines like this :
    EMA fast n bars ago< EMA slower n bars ago
    EMA fast n-1 bars ago< EMA slower n-1 bars ago
    EMA fast n-2 bars ago< EMA slower n-2 bars ago
    repeat above lines until 1 bar ago.

    Is there a faster way to do this?
    Ideally, there is a function in Strategy Builder that I don't know about, like "does not cross above/below" with a look back period.

    Thanks.

    #2
    I think I found my own answer. I clicked on the Help Guide from the control panel in NT8 desktop,
    Navigated to Operations.
    Navigated to the Strategy Builder,
    Navigated to the Condition Builder.
    Clicked on the "Negating a Condition" section.

    Comment


      #3
      I also separated the tabs, so that the "has not crossed" tab sets a trigger variable to true, nothing in this tab resets the trigger.
      Then in the next tab if it does cross & the trigger is set to true, I take and entry/exit action and reset the trigger to false.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      87 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      132 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      65 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      118 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X