Hi,
I was wondering if the following is possible. Say I have a strategy with an Input called "lookback". I want to have my order name to be string.Format("LE lookback {0}", lookback).
When I define the order in the Create method it uses the default lookback value instead of the current value of the lookback input. Once an order is created it seems as though the order is read only and I can't modify the name string in the set method for lookback or in the StartCalc method.
Is there anyway around this?
Modify Order Name [SOLVED]
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Modify Order Name [SOLVED]
The `Send()` method has different versions, and one of them also accepts a string with the order name.I was wondering if the following is possible. Say I have a strategy with an Input called "lookback". I want to have my order name to be string.Format("LE lookback {0}", lookback).
When I define the order in the Create method it uses the default lookback value instead of the current value of the lookback input. Once an order is created it seems as though the order is read only and I can't modify the name string in the set method for lookback or in the StartCalc method.
Is there anyway around this?
So yes, this can be done; simply call another `Send()` method. Depending on the kind of order you made, the overloaded `Send()` methods includes:
- Send()
- Send(int orderSize)
- Send(string orderName)
- Send(string orderName, int orderSize)