Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RSI hide average line

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

    RSI hide average line

    Dear all,

    I've looked a little bit in the forum but could not found the easy answer to my question:

    My custom strategy plot the RSI on a panel and I would like to hide the average line (to keep only the RSI one). I've changed the default color to transparent but each time I select another stock the average line reappars.

    Is it possible to hide it permanently? Is it something I can put in my custom strategy code which for the moment is?

    Code:
    RSI(Vperiodin, 3).Panel = 1;
    RSI(Vperiodin, 3).Lines[0].Value = Vleveldown;
    RSI(Vperiodin, 3).Lines[1].Value = Vlevelup;
    Add(RSI(Vperiodin, 3));
    Many thanks for the help,
    chris

    #2
    Hello Chris,

    Thank you for your post.

    To hide the average or smoothing line you will need to define the color for the average as Transparent.

    Code:
    RSI(Vperiodin, 3).Panel = 1;
    RSI(Vperiodin, 3).Lines[0].Value = Vleveldown; 
    RSI(Vperiodin, 3).Lines[1].Value = Vlevelup;
    [B]RSI(Vperiodin, 3).Plots[1].Pen.Color = Color.Transparent[/B]
    Add(RSI(Vperiodin, 3));
    For more information, please see the following post on Adding Indicators to Strategies.
    CameronNinjaTrader Customer Service

    Comment


      #3
      Fantastic Cameron! I guess Plots[1] is the average line and Plots[0] the RSI?

      Now I would like to add a second RSI on the same panel but with a different period. Would this work?

      Code:
      RSI(Vperiodin, 3).Panel = 1;
      RSI(Vperiodin, 3).Lines[0].Value = Vleveldown;
      RSI(Vperiodin, 3).Lines[1].Value = Vlevelup;
      RSI(Vperiodin, 3).Plots[1].Pen.Color = Color.Transparent;
      Add(RSI(Vperiodin, 3));
      RSI(Vperiodout, 3).Panel = 1;
      RSI(Vperiodout, 3).Plots[1].Pen.Color = Color.Transparent;
      Add(RSI(Vperiodout, 3));
      Or is there something cleaner?

      Many thanks for the quick and efficient solution

      Chris

      Comment


        #4
        Chris,

        Correct, for the RSI, Plots[1] is the Average while Plots[0] is the RSI.

        For adding a second RSI to the same panel, the code you provided is correct.
        CameronNinjaTrader Customer Service

        Comment


          #5
          I can't believe I am right :-) TY

          Comment


            #6
            Hi Cameron,

            I've added the following MA lines to my custom strategy and it is being plotted well in the overlay.

            Code:
            EMA(Vma1).Overlay = true;
            EMA(Vma1).Plots[0].Pen.Color = Color.DarkOrange;
            Add(EMA(Vma1));
            EMA(Vma2).Overlay = true;
            EMA(Vma1).Plots[0].Pen.Color = Color.DarkBlue;
            Add(EMA(Vma2));
            EMA(Vma3).Overlay = true;
            EMA(Vma1).Plots[0].Pen.Color = Color.DarkViolet;
            Add(EMA(Vma3));
            However the colors are not respected (see screenshot attached); could it be an issue with default chart? or something else?

            Cheers,
            Chris
            Attached Files

            Comment


              #7
              Chris,

              It looks like you will need to set the proper input series for each EMA.

              There are a two EMA's that are added under with a new input series but the colors is still being defined for the Vma1 input.

              Please see the edit in bold below:

              Code:
              EMA(Vma1).Overlay = true;
              EMA(Vma1).Plots[0].Pen.Color = Color.DarkOrange; 
              Add(EMA(Vma1)); 
              EMA(Vma2).Overlay = true; 
              EMA([B]Vma2[/B]).Plots[0].Pen.Color = Color.DarkBlue; 
              Add(EMA(Vma2)); EMA(Vma3).Overlay = true; 
              EMA([B]Vma3[/B]).Plots[0].Pen.Color = Color.DarkViolet; 
              Add(EMA(Vma3));
              CameronNinjaTrader Customer Service

              Comment


                #8
                Sorry, stupid mistake from my end! Can't believe I missed it.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by wzgy0920, 02-22-2024, 01:11 AM
                5 responses
                32 views
                0 likes
                Last Post wzgy0920  
                Started by wzgy0920, Yesterday, 09:53 PM
                2 responses
                49 views
                0 likes
                Last Post wzgy0920  
                Started by Kensonprib, 04-28-2021, 10:11 AM
                5 responses
                191 views
                0 likes
                Last Post Hasadafa  
                Started by GussJ, 03-04-2020, 03:11 PM
                11 responses
                3,230 views
                0 likes
                Last Post xiinteractive  
                Started by andrewtrades, Today, 04:57 PM
                1 response
                15 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X