Choosing study value input

Questions about MultiCharts .NET and user contributed studies.
TicksCollector
Posts: 9
Joined: 22 Jan 2014
Has thanked: 5 times
Been thanked: 1 time

Choosing study value input

Postby TicksCollector » 14 Feb 2014

https://www.multicharts.com/trading-sof ... _indicator

It says here that this functionality is not available in MC.NET
By default or totally not?
Do I really need to hard code everything? how? why?

MaRCHeW
Posts: 37
Joined: 16 Nov 2013
Has thanked: 21 times
Been thanked: 8 times

Re: Choosing study value input

Postby MaRCHeW » 14 Feb 2014

Hi :)
https://www.multicharts.com/trading-sof ... _indicator

It says here that this functionality is not available in MC.NET
By default or totally not?
Do I really need to hard code everything? how? why?
Please check it: viewtopic.php?f=19&t=12593&p=100501#p100501

Regards
Karol Marchewka

TicksCollector
Posts: 9
Joined: 22 Jan 2014
Has thanked: 5 times
Been thanked: 1 time

Re: Choosing study value input

Postby TicksCollector » 15 Feb 2014

Hi Karol,

Thanks for the link.
From the example there I see that it helps in not needing to hard code a study in a study, which is a step forward.

Code: Select all

private ADX m_adx_indic;
protected override void Create() {
plot1 = AddPlot();
m_adx_indic = (ADX)AddIndicator("ADX");
m_adx_indic.length = 20;
}
Is there a way to get a list of studies that are loaded on the chart and/or on other charts?
[In SC I can base a study on data from another study on the current chart, or even from a study on a different chart very easily]
Without the above capability (which I can't find in the wiki) there are two major problems:
1. If I have an ADX on a chart and I want to add a moving avg on that ADX, with the example from Henry it means that my MA will run another ADX instance in the background. wasted processing.
2. Without a way to choose an input from a list, it means that I need to code every study when ever I want a study based on a study.

Just as a reference in SC you have IDs for all loaded charts, with that you get access to IDs of studies loaded on those charts, and from there you get access to IDs of data outputs/sources from those studies.
And you do all that in 2 lines of code.

What can we do in MC.NET?

Thanks,
TC

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

Re: Choosing study value input

Postby Henry MultiСharts » 18 Feb 2014

Hello TicksCollector,

That is possible to register each instance of the indicator you need in a singleton and then access this information when you need it, without creating excessive instances of the study. This is a native C# functionality.

TicksCollector
Posts: 9
Joined: 22 Jan 2014
Has thanked: 5 times
Been thanked: 1 time

Re: Choosing study value input

Postby TicksCollector » 18 Feb 2014

Hi Henry,

I checked the link but I don't see how it can help to find studies that are loaded on a chart...
Basically all I want is this functionality in MC.NET:
Image
https://www.multicharts.com/trading-sof ... ator_2.png

To have (for example) a moving avg study that I can plot based on a random study that is loaded on a chart.
I know how it's done in SC but MC.NET is a real struggle for me :-)
If it's not much to ask can you please post a code that does that?

Many thanks,
TC

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

Re: Choosing study value input

Postby Henry MultiСharts » 19 Feb 2014

Hi Henry,

I checked the link but I don't see how it can help to find studies that are loaded on a chart...
Basically all I want is this functionality in MC.NET:
Image
https://www.multicharts.com/trading-sof ... ator_2.png

To have (for example) a moving avg study that I can plot based on a random study that is loaded on a chart.
I know how it's done in SC but MC.NET is a real struggle for me :-)
If it's not much to ask can you please post a code that does that?

Many thanks,
TC
Please find a sample code attached.
Attachments
FromStrategyToIndicatorDataTraslate.pln
(3.38 KiB) Downloaded 533 times

TicksCollector
Posts: 9
Joined: 22 Jan 2014
Has thanked: 5 times
Been thanked: 1 time

Re: Choosing study value input

Postby TicksCollector » 21 Feb 2014

The indicator gives an error.
Pic attached.
File1.jpg
(5.32 KiB) Downloaded 920 times

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

Re: Choosing study value input

Postby Henry MultiСharts » 21 Feb 2014

My apologies. Please find the working version attached.
Attachments
FromStrategyToIndicatorDataTraslate_1.pln
(3.39 KiB) Downloaded 543 times

TicksCollector
Posts: 9
Joined: 22 Jan 2014
Has thanked: 5 times
Been thanked: 1 time

Re: Choosing study value input

Postby TicksCollector » 22 Feb 2014

No need for an apology :-)

I loaded the study, it works now, but it's not what I'm (and I'm sure many more) trying to get .
Here is my apology since maybe I wasn't clear enough...
All we want is this feature:
http://www.multicharts.com/trading-soft ... _indicator

To have an input that can see which **random studies are already loaded** on a chart and choose one of them as input.
In your example we're again back to hard coding which study (or strategy in your example) our indicator looks for.
No, it needs to be random, just like in the link.

Hope it's clearer now.
Have a great weekend,
TC

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

Re: Choosing study value input

Postby Henry MultiСharts » 25 Feb 2014

TicksCollector, this functionality in PowerLanguage runs an instance of the study in the background. It does not use the study you have on a chart or a study from a different chart.

You may want to submit a feature request to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/

TicksCollecor
Posts: 8
Joined: 22 Jan 2014
Has thanked: 1 time

Re: Choosing study value input

Postby TicksCollecor » 26 Feb 2014

I see...
Weird, I thought that with C#.NET support there won't be any limits like in custom scripting.
I registered to the PM forum but it looks so overwhelmingly loaded that for someone who just "tests the water" with MC.NET (SC is my main/current platform which I'm heavily invested in programmingly), to start a quest for new features... with users votes... it's a bit too much atm.

I hope regular MC.NET users will pick this issue up since I have my own "battles" with SC to look after :-)

Thanks for your help Henry. very appreciated.
TC

p.s. How can I reverse the price scale modifying ability? can't find that option.
Now it expands/compress with "click&drag" and moves with "CTRL down + click&drag".
I need it the other around (i.e. just move up/down with "click&drag")

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

Re: Choosing study value input

Postby Henry MultiСharts » 27 Feb 2014

Weird, I thought that with C#.NET support there won't be any limits like in custom scripting.
I'm not sure I understand what custom scripting limitation you are referring to. There was a solution provided to every scripting question you've asked.
p.s. How can I reverse the price scale modifying ability? can't find that option. Now it expands/compress with "click&drag" and moves with "CTRL down + click&drag". I need it the other around (i.e. just move up/down with "click&drag")
Please use Background Dragging


Return to “MultiCharts .NET”