# Indicator on data2

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
siscop
Posts: 192
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 25 times

### Indicator on data2

Hi,
I am a little desperate right now.
I am working since a week on this problem and cant finde a solution.
I put on a chart with
Data1 = M1 (minute)
Data2= D1 (daily)
I just want to have the daily DMI (data2). It doesn’t matter which stock

Code:

Code: Select all

`variables:   dplus(0),   dminus(0); dplus=DMIPlusCustom(h of data2,l of data2, c of data2,14); dminus=DMIMinusCustom(h of data2,l of data2, c of data2,14); print(" dplus: ",dplus," dminus: ",dminus);`

output:

dplus: 0.00 dminus: 81.36

dplus: 0.00 dminus: 97.29

It is obvious that this has to be wrong. There is no DMI with “0” or over “90”.
Could someone please tell me where I am wrong?

TJ
Posts: 6839
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 979 times
Been thanked: 1968 times

### Re: Indicator on data2

siscop wrote:Hi,
I am a little desperate right now.
I am working since a week on this problem and cant finde a solution.
I put on a chart with
Data1 = M1 (minute)
Data2= D1 (daily)
I just want to have the daily DMI (data2). It doesn’t matter which stock

Code:

Code: Select all

`variables:   dplus(0),   dminus(0); dplus=DMIPlusCustom(h of data2,l of data2, c of data2,14); dminus=DMIMinusCustom(h of data2,l of data2, c of data2,14); print(" dplus: ",dplus," dminus: ",dminus);`

output:

dplus: 0.00 dminus: 81.36

dplus: 0.00 dminus: 97.29

It is obvious that this has to be wrong. There is no DMI with “0” or over “90”.
Could someone please tell me where I am wrong?

try this:

dplus=DMIPlusCustom(h , l , c ,14) data2;

viewtopic.php?f=16&t=6929

siscop
Posts: 192
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 25 times

### Re: Indicator on data2

I can’t believe it. It really works.
TJ thank you sooo much… I have been working at this problem for a while now and even developed workarounds.
You are definitely working too hard - Sundays and holydays. I didn’t expect an answer so soon.

TJ
Posts: 6839
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 979 times
Been thanked: 1968 times

### Re: Indicator on data2

siscop wrote:I can’t believe it. It really works.
TJ thank you sooo much… I have been working at this problem for a while now and even developed workarounds.
You are definitely working too hard - Sundays and holydays. I didn’t expect an answer so soon.

You are welcome.