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

RSI indicator

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

    RSI indicator

    Hello all,

    Is there a easy way to check for high of day value of RSI indicators and print a popup (or anything else) on the graph like in the image joint.

    in thinkorswim the code was:
    def daychange = GetDay() != GetDay()[1];
    plot gettoday = GetDay() == 2;

    def RSI_high = CompoundValue(1, if daychange then RSI else if RSI >= RSI_high[1] then RSI else RSI_high[1], RSI);
    def RSI_low = CompoundValue(1, if daychange then RSI else if RSI <= RSI_low[1] then RSI else RSI_low[1], RSI);

    plot RSI_highest1 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 1 then RSI_high else 0);
    def RSI_highest2 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 2 then RSI_high else 0);
    def RSI_highest3 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 3 then RSI_high else 0);
    def RSI_highest4 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 4 then RSI_high else 0);
    def RSI_highest5 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 5 then RSI_high else 0);

    def RSI_lowest1 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 1 then RSI_low else 500);
    def RSI_lowest2 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 2 then RSI_low else 500);
    def RSI_lowest3 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 3 then RSI_low else 500);
    def RSI_lowest4 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 4 then RSI_low else 500);
    def RSI_lowest5 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 5 then RSI_low else 500);

    AddChartBubble(RSI == RSI_highest1 or
    RSI == RSI_highest2 or
    RSI == RSI_highest3 or
    RSI == RSI_highest4 or
    RSI == RSI_highest5, high, "RSI: " + RSI, Color.RED, yes);
    AddChartBubble(RSI == RSI_lowest1 or
    RSI == RSI_lowest2 or
    RSI == RSI_lowest3 or
    RSI == RSI_lowest4 or
    RSI == RSI_lowest5, low, "RSI: " + RSI, Color.GREEN, yes);

    Last edited by xe5436; 12-16-2020, 10:21 AM.

    #2
    Hello xe5436,

    Thanks for your post and welcome to the NinjaTrader forums!

    You would need to create a custom indicator to accomplish your goal.

    Indicators in NinjaTrader are written in Ninjascript which are a collection of methods and properties that are written in C# programming language.

    If you would like to create this yourself, we can provide links to various references to help.

    Alternately, if you would like something created for you, we can provide a link to 3rd party programmers in the NinjaTrader ecosystem

    Alternately, you can create something like that in the Strategy Builder without programming but would need to enable it each day.

    Here are the educational resource available on the strategy builder:
    Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
    Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
    Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X