Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Complex properties/parameters

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

    Complex properties/parameters

    Settings for complex properties are not saved/used.

    Property code:
    Code:
        private OrderParameters _orderParameters = new OrderParameters();
     
        [Category("Order Handling")]
        [Gui.Design.DisplayName("ATM Parameters")]
        public OrderParameters ATMParameters
        {
            get { return _orderParameters; }
        }
    Part of the OrderParameters class code:
    Code:
        [TypeConverter(typeof(ExpandableObjectConverter))]
        public class OrderParameters
        {
            private int _profitTarget = 0;
            private int _stopLoss = 0;
            private bool _simulateStopOrders = false;
     
            private AutoBreakeven  _autoBreakeven = new AutoBreakeven();
            private List<AutoTrail> _autoTrail = new List<AutoTrail>(3);
     
            [Description("Gets or sets the initial stop loss.")]
            [Category("Parameters")]
            public int StopLoss
            {
                get { return _stopLoss; }
                set { _stopLoss = value; }
            }
     
            [Description("Gets or sets the profit target.")]
            [Category("Parameters")]
            public int ProfitTarget
            {
                get { return _profitTarget; }
                set { _profitTarget = value; }
            }
     
            [Description("Indicates whether to simulate stop orders.")]
            [Category("Parameters")]
            public bool SimulateStopOrders
            {
                get { return _simulateStopOrders; }
                set { _simulateStopOrders = value; }
            }
     
            [Category("Parameters")]
            public AutoBreakeven AutoBreakeven
            {
                get { return _autoBreakeven; }
            }
     
            public override string ToString()
            {
                return string.Format("SL: {0}{1}, TP: {2}", _stopLoss, _simulateStopOrders ? " (simulated)" : "", _profitTarget);
            }
        }
    All settings for the property ATMParameters are lost when I start the strategy, instead the default values are used (in this case SL:0, TP:0, ...). Any workaround?

    Another issue is, that these values are not optimizable. Hopefully this will be changed soon.

    Regards,
    Daniel
    Last edited by Buthus; 11-07-2009, 11:37 AM.

    #2
    NT only supports the parameters types supported by the strategy wizard (double/int/bool/string). Anything else is not supported and may or may not work.

    Comment


      #3
      Hello Dierk,

      is there any method that is called after the properties dialog is closed, so that I can store the settings and load them again when the strategy is actually started?

      Regards,
      Daniel

      Comment


        #4
        Unfortunately this is beyond what we could provide support for.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, Yesterday, 10:06 AM
        0 responses
        22 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        19 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        10 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        41 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X