Code: Select all
If XAverage (C, 10)> XAverage (C, 50) then value1 = 30 else value1 = 40;
Value2 = RSI (C, value1);
D 1161229.00 T 1044.00 RSIPERIOD 30.00 RSI(30/40) 41.75 RSI(30) 40.08
D 1161229.00 T 1046.00 RSIPERIOD 30.00 RSI(30/40) 37.48 RSI(30) 35.13
D 1161229.00 T 1048.00 RSIPERIOD 30.00 RSI(30/40) 36.06 RSI(30) 33.52
D 1161229.00 T 1050.00 RSIPERIOD 30.00 RSI(30/40) 31.93 RSI(30) 28.96
D 1161229.00 T 1052.00 RSIPERIOD 30.00 RSI(30/40) 32.20 RSI(30) 29.29
D 1161229.00 T 1054.00 RSIPERIOD 30.00 RSI(30/40) 31.32 RSI(30) 28.33
D 1161229.00 T 1056.00 RSIPERIOD 30.00 RSI(30/40) 32.14 RSI(30) 29.35
Why are they different? Time period - thousands bars.
RSI (C, 30) with different data lengths of 1000 bars or 3000 always gives the same value?
Is this a bug?
Moreover, if the condition for the RSI period is more difficult, then the indicator data will differ from the signal data and the simple RSI (C, 30).