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

PaintBar Ploting Type

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

    PaintBar Ploting Type

    Hi there,

    When i explore one ninja trader indicator, i see the indicator has property name is "Plot PaintBars" and the parameter value can be None, Bar, Outline, Bar Direction. Has Ninja internal this enum type (for example PaintBarPlotType { None, Bar, Outline, Bar Direction } or indicator author created this special enum type for him indicator? I hope i tell you my question clearly.

    Have a nice day.

    #2
    aytacasan, this is not a NinjaScript default enum / method offered, so you would need to check into the custom code for it's definition and code.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Ok thanks i understand. If i want to write this enum and many indicators'll use it. And i'll write some methods that other indicators use it too. For this ninja offer user defined methods file. But i want to write for this purpose custom file How can i do this? Actually i ask this question for global variables, enums, methods etc. What is your recommend?
      Last edited by aytacasan; 10-27-2010, 08:08 AM.

      Comment


        #4
        You can use the UserDefinedMethods for sure, but if you plan to share indicators / strategies with other users I would just create an indicator for example containing your custom methods needed, all variables and data series values could be exposed even if there are no plots -

        BertrandNinjaTrader Customer Service

        Comment


          #5
          I think there is a misunderstanding. I wrote like this:

          namespace NinjaTrader.Indicator
          {
          public enum PaintbarPlotType { None, Bar, Outline, BarDirection };

          public class XXX: Indicator
          {
          private PaintbarPlotType paintbarPlotType = PaintbarPlotType.Bar;
          ...
          ...
          ...
          ...
          }
          }

          An error happend this:

          namespace NinjaTrader.MarketAnalyzer
          {
          public partial class Column : ColumnBase
          {
          [Gui.Design.WizardCondition("Indicator")]
          public Indicator.XXX XXX(PaintbarPlotType paintbarPlotType)
          {
          return _indicator.T3TriggerLines(paintbarPlotType);
          }

          >>>>>Ninja can't find type. Maybe i can write like this NinjaTrader.Indicator.PaintbarPlotType

          But i can't because:
          // This namespace holds all market analyzer column definitions and is required. Do not change it.

          How can i use my own types??????

          Comment


            #6
            Your placement of the public enum is incorrect. It needs to be done outside of the NinjaTrader.Indicator namespace.

            Please see this reference sample for an example: http://www.ninjatrader.com/support/f...ead.php?t=3420
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Uppps sory, yes you are right. Thanks.
              Last, about custom needs tell me please how can i do below:

              I want to create a parameter like Plot, but i don't want to user can change plot style. I need this because i want to create shadow for my moving average and i don't want to user change its style. How can i do this? I have to create PlotEx class wich inherit Plot class???

              And ninja has the sequence for plot the plots?

              Comment


                #8
                Not exactly sure I understood you, but the easiest way to do what you want is just to hard set the values you want. If the user changes the value just have your code change it back to the settings you prefer.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by burtoninlondon, Today, 12:38 AM
                0 responses
                2 views
                0 likes
                Last Post burtoninlondon  
                Started by AaronKoRn, Yesterday, 09:49 PM
                0 responses
                11 views
                0 likes
                Last Post AaronKoRn  
                Started by carnitron, Yesterday, 08:42 PM
                0 responses
                10 views
                0 likes
                Last Post carnitron  
                Started by strategist007, Yesterday, 07:51 PM
                0 responses
                12 views
                0 likes
                Last Post strategist007  
                Started by StockTrader88, 03-06-2021, 08:58 AM
                44 responses
                3,982 views
                3 likes
                Last Post jhudas88  
                Working...
                X