Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

fractional values in the optimization parameters

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

    fractional values in the optimization parameters

    Hi,

    I can not put fractional values in the optimization parameters

    Increase in the fractional value is accepted.

    In Max and Min not.

    For example, 12 turns into 1.2 / 0.6 turns into 6

    Here it is:

    [Range(0, double.MaxValue)]
    [NinjaScriptProperty]
    [Display(Name="Amplitude", Order=1, GroupName="Parameters")]
    public double AMPLITUDE
    { get; set; }

    #2
    Hello nichetti,

    Thanks for your post and welcome to the forums!

    I added your example property code to the sampleMACrossover strategy and ran the strategy in the optimizer. I was able to input decimal values for Min, Max and Increment. (see attached picture).

    Can you add more clarity to the issue so that I could further replicate on my end?
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I have the exact same problem. I can't enter double values into min and max fields of a double property. I use german windows. It seems NT is confusing parsing of decimals.

      Suprisingly increment field works but is displayed different after parsing. Should be "0,1" instead "0.1". I can't change it to 0.123, have to clear the field and write "0,123".

      I cannot enter a dot (.) in these fields.

      See screencast


      ----
      It gets even more confusing when trying to edit the combination field of all 3 values. I can enter the dot there but it gets removed when I tab out of the field. I can't enter comma into that field either.

      Last edited by blueM; 10-20-2015, 06:37 PM.

      Comment


        #4
        Originally posted by blueM View Post
        I have the exact same problem. I can't enter double values into min and max fields of a double property. I use german windows. It seems NT is confusing parsing of decimals.

        Suprisingly increment field works but is displayed different after parsing. Should be "0,1" instead "0.1". I can't change it to 0.123, have to clear the field and write "0,123".

        I cannot enter a dot (.) in these fields.

        See screencast


        ----
        It gets even more confusing when trying to edit the combination field of all 3 values. I can enter the dot there but it gets removed when I tab out of the field. I can't enter comma into that field either.

        http://screencast-o-matic.com/watch/co6rcxhf0I
        ref: http://ninjatrader.com/support/forum...01&postcount=1

        Comment


          #5
          Hello blueM,

          Thanks for your post and Welcome to the forums!

          As member Koganam has advised it is the regional settings. Here is a link to the full post Koganam referenced: http://ninjatrader.com/support/forum...301#post431301
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Ofcourse its the regional settings but this should be fixed in NT8. It works in NT7 and properly using WPF with globalization in mind is no problem too. Please put that issue into the bugtracker.

            Changing Windows regional settings is no solution as this machine is not dedicated to NT only.

            Until you introduce region awareness I recommend forcing the culture as hotfix to be set to "en-US" for the whole application like this:

            Code:
            CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
            CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("en-US");
            FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));

            Comment


              #7
              Hello blueM,

              Thanks for your reply.

              This has been reported as a bug and currently has a tracking number of NT8 - 8999.
              Paul H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by funk10101, Today, 12:02 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by GLFX005, Today, 03:23 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Erick  
              Started by nandhumca, Yesterday, 03:41 PM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by The_Sec, Yesterday, 03:37 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by vecnopus, Today, 06:15 AM
              0 responses
              1 view
              0 likes
              Last Post vecnopus  
              Working...
              X