Property code:
private OrderParameters _orderParameters = new OrderParameters();
[Category("Order Handling")]
[Gui.Design.DisplayName("ATM Parameters")]
public OrderParameters ATMParameters
{
get { return _orderParameters; }
}
[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);
}
}
Another issue is, that these values are not optimizable. Hopefully this will be changed soon.
Regards,
Daniel

Comment