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 wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    27 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 04-23-2024, 09:53 PM
    2 responses
    49 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    193 views
    0 likes
    Last Post Hasadafa  
    Started by GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,235 views
    0 likes
    Last Post xiinteractive  
    Working...
    X