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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    155 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    90 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    137 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X