Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MACD Histogram Spread Falling Rising - Previous Bar

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

    MACD Histogram Spread Falling Rising - Previous Bar

    Hello Support,

    I need to use the MACD histogram falling & rising phenomenons in my strategy. Here is what i am doing:

    Code:
    if(Falling(MACD(10, 15, 5)))
    {
        //Logic
    }
    This will calculate the MACD from the current bar. What i need is to be able to check it on the previously closed bar, or on the bar before that. How can i achieve this?

    Please advise.

    Thanks.
    Umer

    #2
    Hello Umer,

    Thanks for your note.

    The Falling() method only checks that the current value of the dataseries is lower than the bar 1 bar ago.

    This means you could do the same check using bars ago.

    For example:

    if (MACD(10, 15, 5)[1] < MACD(10, 15, 5)[2])
    {
    // execute code
    }

    This will check if the MACD was falling on the previous bar.

    Below is a link to the help guide on Falling().
    http://www.ninjatrader.com/support/h...t7/falling.htm


    Please let me know if this does not resolve your inquiry.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    647 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X