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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    59 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X