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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    49 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X