How can I do this simple thing?

Questions about MultiCharts and user contributed studies.
Chris
Posts: 150
Joined: 17 Nov 2005

How can I do this simple thing?

Postby Chris » 21 Mar 2006

I just want to base a study on a second data stream inside the code and I want the exact same results like if I click "Base Study On" Data2.

I am aware of the code "Close of Data2" for example, but this giving strange results.

Hope you can help me.

Thank you,

Chris
Attachments
TwoStudies1.png
Two Data Streams and one study based on each data stream.
(71.51 KiB) Downloaded 1089 times
TwoStudies2.png
Two studies based on the the same Data stream - 500 - and close set to "Close of Data1" and "2" manually.
(67.35 KiB) Downloaded 1076 times
TwoStudies3.png
Two studies based on the the same Data stream - 1000 - and close set to "Close of Data1" and "2" manually.
(64.14 KiB) Downloaded 1097 times

User avatar
Alex Kramer
Posts: 834
Joined: 23 Feb 2006

Postby Alex Kramer » 21 Mar 2006

The variations in plotted results depend not only on the input series - Close data1, Close data2, but on other factors as well:
1. The base series to which the indicator is applied - influences the historicel values of the variables.
2. Impicitly used in the indicators data (high.low) from the default series

If the entire algorithm is in a single function, then identical results on different series can be achieved with indicationg an explicit DataN for the function.

For example:
indicator "custom line1"(average(c,14) data1,false) based on data1
indicator "custom line1"(average(c,14) data1,false) based on data2
- in this case plot values will match.

Chris
Posts: 150
Joined: 17 Nov 2005

Postby Chris » 21 Mar 2006

Alex,

in a study based on Data-Stream1 I want to use a second study inside the code based on a second Data-Stream. I want this internal used study to give me the exact same results like if I base it on Data2 seperately.

How can I do this without having to use external DLLs?

Thanks for your help,

Chris

User avatar
Alex Kramer
Posts: 834
Joined: 23 Feb 2006

Postby Alex Kramer » 21 Mar 2006

If you want a second plotted indicator to be based on the other symbol from the one the first is based on, such plotting is not possible.
If you just want such an indicator's values to be calculated, you can just wrap this up as a function and call it from the required datastream, as in my previous post.

Chris
Posts: 150
Joined: 17 Nov 2005

Postby Chris » 21 Mar 2006

I want to have access to the values of a study running on a different timeframe directly inside a study running on my chart.
I don't want to plot the values, just use them.

If there is a way, can you give me an example (average on an average from a second timeframe).

I can do it with external DLLs, but I'd love to do it in MC directly.

Thanks,

Chris

Guest

Postby Guest » 21 Mar 2006

I want to have access to the values of a study running on a different timeframe directly inside a study running on my chart.
I don't want to plot the values, just use them.

If there is a way, can you give me an example (average on an average from a second timeframe).

I can do it with external DLLs, but I'd love to do it in MC directly.

Thanks,

Chris
Chris

I do believe they have a bug. So don't beat your head against the wall. It has to do with the fact there is a second data stream. Try comparing the indicators on both data streams as based on separately with indicators on a separate chart with only one data stream. I cannot get them to match. Whats worse is they seem to change.

J~


Return to “MultiCharts”