Modify Order Name  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
GTrader
Posts: 83
Joined: 30 Oct 2012
Has thanked: 24 times
Been thanked: 8 times

Modify Order Name

Postby GTrader » 05 Feb 2016

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?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Modify Order Name  [SOLVED]

Postby JoshM » 05 Feb 2016

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?
The `Send()` method has different versions, and one of them also accepts a string with the order name.

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)


Return to “MultiCharts .NET”