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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      22 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      19 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      14 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      10 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      41 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X