Using CommandLine within .Net code  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
mokomo
Posts: 5
Joined: 05 Jun 2013
Has thanked: 4 times

Using CommandLine within .Net code

Postby mokomo » 23 Aug 2013

Is it possible to use CommandLine("") to populate data number 1,2,3,4 etc via code rather than as an entry to the GUI Command Line box? (is it indicator or signal code? what 'using' statement is the correct reference?)

Can you provide an example?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Using CommandLine within .Net code  [SOLVED]

Postby Henry MultiСharts » 23 Aug 2013

Hello mokomo,

The main chart window should be created from GUI. That is possible to change the instrument and add additional data series using ChartCommands.CommandLine. You can utilize it from both indicator and signal.
Please find a sample code attached.
Attachments
Test_CommandLine.pln
(1.03 KiB) Downloaded 721 times

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

Re: Using CommandLine within .Net code

Postby JoshM » 27 Feb 2014

Adding indicators and strategies through the CommandLine in MC .NET is helpful, but can the CommandLine also be used for removing of indicators and strategies?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Using CommandLine within .Net code

Postby Henry MultiСharts » 27 Feb 2014

Adding indicators and strategies through the CommandLine in MC .NET is helpful, but can the CommandLine also be used for removing of indicators and strategies?
Unfortunately there is no such functionality at the moment.

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

Re: Using CommandLine within .Net code

Postby JoshM » 27 Feb 2014

Unfortunately there is no such functionality at the moment.
Ah okay. I made a PM for it here:

MC-1612 - [Command Line] Allow removing indicators and strategies.

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

Re: Using CommandLine within .Net code

Postby JoshM » 10 Mar 2014

Another PM to enhance the usability of the Command Line:

MC-1621 - Allow removal of non-primary data series through Command Line.

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

Re: Using CommandLine within .Net code

Postby JoshM » 13 Jul 2014

Do you guys also find it somewhat odd that we can specify the data series on which the indicator is calculated on (with the `base` parameter), but that indicators are always added on the main price chart?

For example, if you add a moving average through the Command Line with `base=3`, it calculates on the third data series but plots on the first.

If find that counter-intuitive, but I'm not sure if this warrants another low-voted feature request.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Using CommandLine within .Net code

Postby Henry MultiСharts » 16 Jul 2014

Do you guys also find it somewhat odd that we can specify the data series on which the indicator is calculated on (with the `base` parameter), but that indicators are always added on the main price chart?

For example, if you add a moving average through the Command Line with `base=3`, it calculates on the third data series but plots on the first.

If find that counter-intuitive, but I'm not sure if this warrants another low-voted feature request.
JoshM, we will add a parameter for that in MultiCharts 9.1


Return to “MultiCharts .NET”