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