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

Help with RSI Plot

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

    Help with RSI Plot

    Hi,
    I'd like to plot RSI on a +50 to -50 scale instead of the traditional 100 to 0 so I can overlay it on top of a second osscilator. Can you help with this programming logic or point me to an example?

    Thank in advance

    #2
    Hello,

    Try something like this:

    double temp_rsi = RSI(my_period, my_smoothing)[0];

    if(temp_rsi ==0)
    {
    my_plot.Set(temp_rsi);
    }
    else
    {
    my_plot.Set(temp_rsi / 2);
    }

    Note: this is untested code, so you will want to test it first.
    DenNinjaTrader Customer Service

    Comment


      #3
      Thanks Ben

      Hi Ben,

      Althoough the code you sent didn't exactly do what I needed, it definitely pointed me in the right direction and got solved it in about 5 minutes.

      Thanks very much!

      PS...has anyone to your knowledge ever tried to write the code, or been succesful in writing the code that would calculate the distance to the next pivot point? I'm working on an advanced stategy, and if you know if this would be possible it would help me to know so I can continue working on it or get a consultant.

      thanks

      Comment


        #4
        Hello,


        The calculation itself is simple math. For example R1 - PP.

        To get the various pivot values do something like this:

        double pp = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).PP[0];

        This link will help:


        Note this is not tested code, so please test it first.
        DenNinjaTrader Customer Service

        Comment


          #5
          Thank Ben..One more quick question please

          I appreciate your direction. I've been able to accopmplish what I wanted to. So thanks. One more quick question and I'll leave you alone.

          I am interested in being able to plot, as a histogram, time and sales data for the current bar using the block trade filter feature that the T&S Window supplies. The realtime volume indiactors on the forum do not offer this filtering option. I rerally only care about block volume of certain sizes.

          Is this possible? If so, I can't find any info in the help file about. Do you have any suggestions, or a way/code of accessing the T&S data?

          Thanks again.

          PS..I have almost fully converted over from eSignal to Ninja...and will be absolutely complete if I accomplish this last T&S / Block volume issue. NT is great, and when I do figure this out I will be re-subscribing to the real service

          Scott

          Comment


            #6
            Hello,


            You will want to use OnMarketData() and e.Volume then filter it yourself with your code. This link will help:
            DenNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by kaywai, 09-01-2023, 08:44 PM
            5 responses
            601 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            6 responses
            22 views
            0 likes
            Last Post xiinteractive  
            Started by Pattontje, Yesterday, 02:10 PM
            2 responses
            17 views
            0 likes
            Last Post Pattontje  
            Started by flybuzz, 04-21-2024, 04:07 PM
            17 responses
            230 views
            0 likes
            Last Post TradingLoss  
            Started by agclub, 04-21-2024, 08:57 PM
            3 responses
            17 views
            0 likes
            Last Post TradingLoss  
            Working...
            X