Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Distance between EMA and SMA

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

    Distance between EMA and SMA

    I would appreciate help with a simple matter, at least I think it is simple:

    Here is what I want to do:

    Build a condition where I want to have a distance of a minimum of 4 ticks between the EMA 13 and the SMA 20. I believe I can do so in the Strategy wizard's condition builder. But how?

    I chose EMA 13 on the left side, and SMA 20 on the right side. Let's say to go long so I chose in the middle the "is larger than" symbol.

    The parameter fields below then ask for:

    For the EMA 13:
    InputSeries DefaultInput
    Plot BuyPressure
    Bars ago 0
    Offset type Ticks
    Offset 0
    Plot on chart False

    For the SMA 20:
    InputSeries DefaultInput
    Plot BuyPressure
    Bars ago 0
    Offset type Ticks
    Offset 0
    Plot on chart False

    What do I have to input where in these two parameter fields to accomplish what I said above (wanting a distance of 4 ticks between the two MAs.)

    sandman

    #2
    sandman, you'll have to set the offset to 4 to get what you want. However, you will need to create two sets of conditions because sometimes the EMA will be above the SMA and sometimes it will be the other way around. You'll need to create an offset that depends on the relative positions of the moving averages.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thank you Austin.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      633 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      364 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      567 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X