I can't get two RSI's to plot correctly in the same study window in two different time frames, it's driving me crazy, I must be missing something, or is it an MC bug ?
Here is the code I'm using:(I'm not a programmer but I've done something similar in TS2ki years ago and it worked)
vars:intrabarpersist Rsd1(0),intrabarpersist Rsd2(0,data2);
rsd1 = rsi(c,14);
rsd2 = rsi(c of data2,14);
plot1(rsd1,"rsd1");
plot2(rsd2 ,"rsd2");
plot3(50,"fifty");
Since this is applied to Data1 it doesn't accurately get the value of data2. The photo attached shows the values in red for the rsi's applied to data 2, they don't match. The upper rsi is applied to data2, the lower rsi is applied to data1 and is trying to call the value on data2. (Ver4 beta3)
I could just overlap the indicators in one window but then the scaling would be off.(zero lines wouldn't match etc)
MC_BUG ? Plot2 RSI's, one on data1 and one on data2-HELP !
-
- Posts: 407
- Joined: 01 Jan 2008
- Been thanked: 3 times
MC_BUG ? Plot2 RSI's, one on data1 and one on data2-HELP !
- Attachments
-
- RSI Data2.jpg
- (101.75 KiB) Downloaded 593 times
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Hi Steven,
The RSI function uses serial variables (referencing previous values).
These variables change within the context of the data series to which an indicator is applied.
Example1:
In the example above, the argument uses data2 values. At the same time, variables in RSI are based on the data series to which the indicator is applied (data1)
Example 2
In the second example, data2 is take nfor the RSI function (for internal variables and for the arguments)
and
are equivalent
In other words, all you need to do is modify the code. Instead of use
Regards.
The RSI function uses serial variables (referencing previous values).
These variables change within the context of the data series to which an indicator is applied.
Example1:
Code: Select all
rsd2 = rsi(c of data2,14);
Example 2
Code: Select all
rsd2 = rsi(c, 14) of data2;
Code: Select all
rsd2 = rsi(c, 14) of data2;
Code: Select all
rsd2 = rsi(c of data2, 14) of data2;
In other words, all you need to do is modify the code. Instead of
Code: Select all
rsd2 = rsi(c of data2,14);
Code: Select all
rsd2 = rsi(c of data2,14) of data2;
-
- Posts: 407
- Joined: 01 Jan 2008
- Been thanked: 3 times
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
-
- Posts: 4
- Joined: 25 Aug 2007
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
I just want to add that not only RSI gives an error : 'STD exception: invalid argument' when used with not data it based on. Also DMI, ADX and I believe others have the same bug.
It worked on version 3. And Since Version 4 - getting this error. Please, release patch for that ASAP. Need it in beta 2 of Release5. All my studies are stocked with this.
Thanks, Victor
It worked on version 3. And Since Version 4 - getting this error. Please, release patch for that ASAP. Need it in beta 2 of Release5. All my studies are stocked with this.
Thanks, Victor