Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator scale

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

    Indicator scale

    Hello,

    I'm currently making a strategy with a dynamic RSI. This is the RSI combined with the bollinger bands.
    When I create a chart and add both indicators to the plot I can see that the scales are the same for both. I selected this manually in the indicator tab in visual. As u can see in the first image, both scales are the same and the goal would be to buy when the rsi comes back into the bands.
    Now when I program this in a strategy I find that the scales are not the same. U can see this is in 2nd image. This results in the strategy not buying on the right moment. How can I fix this ?

    Greetings,
    Sebastiaan

    #2
    Hello SebastiaanR,

    Thanks for your post.

    Regardless of the scales, the strategy will work with the mathematical values of the indicators so if it is not trading at the correct times then you may need to debug your code to determrine the values that are being used. Here is a link to our debugging tips: https://ninjatrader.com/support/help...script_cod.htm

    To have the startegy add both indicators to the same panel and use the same scale you can specify this in State.dataLoaded for example:

    Code:
                else if (State == State.DataLoaded)
                {
                    myB = Bollinger(RSI(14,3), 2.25, 14);
                    myRSI = RSI(14, 3);                
                    AddChartIndicator(myB);
                    AddChartIndicator(myRSI);                
                    myB.Panel = 1;
                    myB.ScaleJustification = ScaleJustification.Right;
                    myRSI.Panel = 1;
                    myRSI.ScaleJustification = ScaleJustification.Right;                
                }

    Comment


      #3
      Hi PaulH,

      Thank you !
      Unfortunately for me, the strategy was trading at the correct times so the strategy is simply not profitable

      Greetings,
      Sebastiaan

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      65 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      139 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      75 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X