Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy on falling RSI

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

    Strategy on falling RSI

    Hello everyone,

    I am new to creation of ninjatrader strategy and hope i can get some feedback from the forum.

    I am trying to strategy to include an overbought condition if RSI is falling from 70 within the past 5 bars.

    Is this possible? if so, can you share with me the code?

    Thank you.

    Norman

    #2
    Hello,

    Thank you for the question.

    The default Falling NinjaScript methods would be very simple and only uses the last values, by definition it checks for a falling condition which is true when the current value is less than the value of 1 bar ago.

    if you would like to know over a Period you could create this with logic. One example would be based on the description above:

    Code:
    if(RSI(12,14)[0] < RSI(12,14)[1])
    {
       //is falling
    }
    To append more conditions, you can use the && symbol:

    Code:
    if(RSI(12,14)[0] < RSI(12,14)[1] [B]&&[/B] RSI(12,14)[1] < RSI(12,14)[2])
    {
       //is falling
    }
    etc..

    You could create the condition 5 times like this to check 5 bars ago.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Sparkyboy, Today, 10:57 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by swestendorf, Today, 11:14 AM
    1 response
    3 views
    0 likes
    Last Post swestendorf  
    Started by TheMarlin801, 10-13-2020, 01:40 AM
    21 responses
    3,917 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by timmbbo, 07-05-2023, 10:21 PM
    3 responses
    156 views
    0 likes
    Last Post grayfrog  
    Started by Lumbeezl, 01-11-2022, 06:50 PM
    30 responses
    813 views
    1 like
    Last Post grayfrog  
    Working...
    X