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 NullPointStrategies, Today, 05:17 AM
      0 responses
      46 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
      66 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