Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicators that will not plot.

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

    indicators that will not plot.



    people with nt,




    greetings. i need assistance from nt, hopefully it will not take a week to receive a reply as has happened to me previously.



    i am trying to prepare two strategies i have developed for distribution.





    my strategies depend on a number of indicators that i have developed. in order to distribute the strategies and then for the strategies to function as intended, i will necessarily have to distribute the indicators as well.


    therefore, i am trying to create limited versions of my indicators that will perform the calculations they were created for but will not plot or be usable in any other way.


    and today i spent some time trying to create versions of my indicators that would not plot. through trial and error i arrived at a formulation that will not plot.


    i first removed the addplot command and then set defaults to these:


    Calculate = Calculate.OnBarClose;
    IsOverlay = true;
    DisplayInDataBox = false;
    DrawOnPricePanel = true;
    DrawHorizontalGridLines = false;
    DrawVerticalGridLines = false;
    PaintPriceMarkers = false;
    ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
    IsVisible = false;
    IsSuspendedWhileInactive = false;​




    the problem is that if i try to use these versions of the indicators in a strategy there will be an endless stream of index outside bounds of array error notifications even when the currentbars check has been properly established with the appropriate values.



    and through further trial and error i have discovered that a version of one single indicator in which i had restored the plotting commands is available in nt's strategy builder interface. all the other 7 indicators which i prepared not to plot are not available in the strategy builder, even when all compile without errors or warnings.



    apparently at some level nt requires a visible plot to consider an indicator to be an indicator. and this is a significant problem because i only want to distribute indicators that will not plot.


    when i first asked about this i received a suggestion to use boolean indicators which does not make any difference because if i use boolean checks i would still need to distribute my indicators to clients first so that the boolean checks can be performed on their own devices.



    this is a significant problem and seemingly something that nt has never prepared for before. ¿what can nt suggest to be able to overcome this situation?



    very well, regards.


    #2



    this is the momentum indicator which i have modified so that it will not plot and have no user inputs.



    it will not plot which is the point, however, as i explained earlier the nt platform will not recognize this indicator as an indicator even when the entire structure and functionality should be there.





    namespace NinjaTrader.NinjaScript.Indicators
    {

    public class zzz00slss01 : Indicator
    {
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"zzz00slss01.";
    Name = "zzz00slss01";
    Calculate = Calculate.OnBarClose;
    IsOverlay = false;
    DisplayInDataBox = false;
    DrawOnPricePanel = true;
    DrawHorizontalGridLines = false;
    DrawVerticalGridLines = false;
    PaintPriceMarkers = false;
    ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
    IsVisible = false;
    IsSuspendedWhileInactive = false;

    }
    }

    protected override void OnBarUpdate()
    {
    Value[0] = CurrentBar == 0 ? 0 : Input[0] - Input[Math.Min(CurrentBar, 3)];
    }

    region Properties


    #endregion​

    Comment


      #3
      Hello rtwave,

      Thank you for your post.

      Indicators will only be accessible in the Strategy Builder if the indicator contains a plot and a value is assigned to that plot. The Strategy Builder would then be able to access that plot's value in the Conditions and Actions screen. Unfortunately, if your indicator is not assigning any plots via AddPlot() then it will not be available in the Strategy Builder.

      Regarding the index out of bounds error, it's difficult to say what could be going on without seeing the code and output from debugging. Have you debugged to determine which line of code is throwing the error?
      Gaby V.NinjaTrader Customer Service

      Comment


        #4




        people with nt,



        greetings.



        this has been awful, i have not been able to make any progress in preparing my numerous indicators for distribution.



        i thought of asking NinjaTrader_Jim for guidance but i see he seemingly left nt back in 2022.




        anyway, i have been trying to think of alternative formulations to be able to distribute my indicators without exposing my intellectual property.



        _ the first possibility i have thought of is, ¿is it possible to create an indicator without a plot but with tseries to hold all the relevant values? ¿will nt consider such an indicator to be valid?


        _ another possibility that has come to mind is, ¿is it possible to create a version of an indicator where the plot color is set to transparent - invisible and which will be set to plot in a secondary panel and where it is impossible for users to change these settings?


        _ and finally, some indicators like channels and bands hold multiple values and calculations. ¿is it possible to create an indicator in which the primary value is an irrelevant price point series (low[0]) and where the relevant values will not plot or be exposed in the data box or in any other way?



        very well, regards.
        Last edited by rtwave; 03-25-2025, 11:00 AM.

        Comment


          #5
          Hello rtwave,

          An indicator without a plot is fine, but if by "valid" you mean "will be available in the Strategy Builder" then sadly no. It needs a plot to be available in the Strategy Builder.

          You can set the indicator plot to transparent and have it not be configurable by the user by using ArePlotsConfigurable.

          Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


          You can prevent Transparent plots from showing up in the Data Box by setting ShowTransparentPlotsInDataBox to false within the indicator's code.



          Gaby V.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by raysinred, Yesterday, 10:32 AM
          1 response
          15 views
          0 likes
          Last Post rockmanx00  
          Started by cbadr, Yesterday, 08:19 PM
          0 responses
          4 views
          0 likes
          Last Post cbadr
          by cbadr
           
          Started by DayTradingDEMON, Yesterday, 07:23 PM
          0 responses
          7 views
          0 likes
          Last Post DayTradingDEMON  
          Started by XXfea, Yesterday, 07:01 PM
          0 responses
          9 views
          0 likes
          Last Post XXfea
          by XXfea
           
          Started by RedPothos, Yesterday, 05:07 PM
          0 responses
          12 views
          0 likes
          Last Post RedPothos  
          Working...
          X