Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EMA Strategy Question

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

    #16
    bharrell, unfortunatly we don't provide custom programming services. Maybe someone on the forums can help you out.

    I would recommend starting with the simplest strategy as possible and then adding complexity one layer at a time until it "breaks".

    What I can do is provide you a super simple explaination/demonstration. From what I can tell, you are trying to trade on a "color change", which is really just when the indicator has a peak or trough. Thus, you need to identify when there is a peak or trough. If you think about it, a peak occurs when the most recent value is below the previous value which is above the value before that (looks like this ^ ). Vice-versa for a trough. This can be programmed like this:
    Code:
    if (EMA_Color[0] < EMA_Color[1] && EMA_Color[1] > EMA_Color[2])
        // peak identified - go short or whatever you want it to do
    if (EMA_Color[0] > EMA_Color[1] && EMA_Color[1] < EMA_Color[2])
        // trough identified - do something else, like go long
    Even though I've written this in code, it can be translated to the wizard by using the barsAgo values. EMA_Color[2] means the value of the EMA_Color indicator 2 bars ago.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cmoran13, Yesterday, 01:02 PM
    0 responses
    31 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    22 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    160 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    95 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    148 views
    2 likes
    Last Post CaptainJack  
    Working...
    X