Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change from rising to falling

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

    Change from rising to falling

    Could someone please tell me where I can find a reference for the following.

    I have a rising LinReg and in the next bar I have a falling LinReg. It changes from rising to falling (and of course vice versa). I want to express in code the change but cannot figure out how to do that. Perhaps I am temporarily blinded.

    sandman

    #2
    sandman, you can just directly compare the LinReg values for the different bars ago comparisons to arrive at your conditions, i.e.

    if (LinReg(14)[0] < LinReg(14)[1] && LinReg(14)[1] > LinReg(14)[2])
    // change from rising to falling, do something
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by vantojo, Today, 09:32 AM
    0 responses
    4 views
    0 likes
    Last Post vantojo
    by vantojo
     
    Started by FelipeRXP, Today, 08:40 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by petedian, Today, 08:44 AM
    0 responses
    12 views
    0 likes
    Last Post petedian  
    Started by J0shTrader, Yesterday, 12:29 PM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by bc24fl, Today, 08:07 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X