Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimizer doesn't allow uint as range input

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

    Optimizer doesn't allow uint as range input

    Topic says it all, shouldn't make a difference in the optimizer algo if int or uint is used right?

    #2
    Hello,

    What is uint? The optimizer does not work on tick data at this time, so any bar that uses tick data will not work. Use min. data.
    DenNinjaTrader Customer Service

    Comment


      #3
      Hi Ben!

      As it seems you are not familiar with C# programming so you might forward this topic to a programmer in your company.


      A good programmer usually chooses the correct data type because you can't trust user input. That is what I did in my custom strategy:

      Code:
      private uint NotEverGetNegative;
      Of course this has the appropriate set and get properties as public.


      With the uint datatype it is not possible to choose values in the strategy optimizer. This is Min. Value, Max. Value and Increment.

      For the int datatype it works. Of course point beeing, int nearly same as uint.

      Comment


        #4
        Hello,

        I am familiar with C#, but only in the context of NinjaScript. I have never seen that type used in NS. If I understand, uint will never be negative. Is that what you want? If so, the following will maintain a zero value for an negative int. Or you can modify it to change return absolute value etc. of what you want. This is found in Properties.

        [Description("")]
        [Category(
        "Parameters")]
        publicint MyInput0
        {
        get { return myInput0; }
        set { myInput0 = Math.Max(0, value); }
        }
        DenNinjaTrader Customer Service

        Comment


          #5
          Why make it simple if there's a complicated way to do it...


          No offense here but these value types are basic programming skills found in every programming book on the first pages.

          Anyway just consider adding it to the supported types in the strategy analyser. Thx!
          I'm out!

          Comment


            #6
            Hello,

            What I posted is a way to get it to do what you want. However I will have someone take a look at this on Monday and tell you for sure if that type is not supported. I do not think it is though.
            DenNinjaTrader Customer Service

            Comment


              #7
              NT only allows int and double as range input. We noted your request and will add it to the list of future considerations.
              DierkNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by sdauteuil, Today, 12:00 PM
              0 responses
              5 views
              0 likes
              Last Post sdauteuil  
              Started by georges61, Today, 11:35 AM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by outcodenick, Today, 11:48 AM
              0 responses
              1 view
              0 likes
              Last Post outcodenick  
              Started by EquityTrader, Today, 11:37 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Kate  
              Started by Atomic, Today, 11:27 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X