Page 1 of 1

How can I do this simple thing?

Posted: Mar 21 2006
by Chris
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

Posted: Mar 21 2006
by Alex Kramer
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.

Posted: Mar 21 2006
by Chris
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

Posted: Mar 21 2006
by Alex Kramer
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.

Posted: Mar 21 2006
by Chris
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

Posted: Mar 21 2006
by Guest
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~