Yes, I need it because I want the RSI to use the average of the price movements of each currency pair. However, when I change for(i=pos; i<rates_total;i++) to for(i=pos;i<Max_Bars;i++) in the main loop, the displayed RSI disappears and I am in trouble. The indicator is very heavy when using rates_total, so I want to make it lighter.
What do you think about this code?
for(int i = 0; i<Max_Bars; i++){
for(j=i; j<=j+RSI_Period;j++){
}
}
Kosei S #: Yes, I need it because I want the RSI to use the average of the price movements of each currency pair. However, when I change for(i=pos; i<rates_total;i++) to for(i=pos;i<Max_Bars;i++) in the main loop, the displayed RSI disappears and I am in trouble. The indicator is very heavy when using rates_total, so I want to make it lighter. What do you think about this code?
I have already explained that the way the RSI is calculated, based on EMA, you can't just reduce the number of bars without greatly affecting the calculations.
You can use SMA instead, but the results will be different. However, you need to understand the maths behind the RSI first, before you can substitute the EMA for SMA.
An implementation of the Relative Strength Index indicator by John Welles Wilder Jr. as described in his book—New Concepts in Technical Trading Systems [1978].
I have already explained that the way the RSI is calculated, based on EMA, you can't just reduce the number of bars without greatly affecting the calculations.
You can use SMA instead, but the results will be different. However, you need to understand the maths behind the RSI first, before you can substitute the EMA for SMA.
Thank you for your help, Im gonna try it Realy appreciate
I would like to display only the specified bars by RSI in order to lighten the indicator, but it is not displayed well. How to display RSI for only specified of bars?
In any case, it's a pointless idea. The depth you are trying to limit is only calculated once after initialization. I think you are trying to save about a few milliseconds not with every tick, but only 1 time when attaching.
It's like trying to turn the ignition key faster in order to drive 1000 kilometers faster.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
まず自分自身に問いかけてください。なぜこれをやりたいのですか?
EAでRSIを計算する際の「負荷」を軽減するためでしょうか?
「はい」の場合、増分計算であることを考慮すると、EMA の使用は完璧な解決策です。 インジケーターを使用する代わりに、EA で RSI を段階的に計算するだけです。
それともこれを望む別の理由がありますか?
Yes, I need it because I want the RSI to use the average of the price movements of each currency pair. However, when I change for(i=pos; i<rates_total;i++) to for(i=pos;i<Max_Bars;i++) in the main loop, the displayed RSI disappears and I am in trouble. The indicator is very heavy when using rates_total, so I want to make it lighter.
What do you think about this code?
I have already explained that the way the RSI is calculated, based on EMA, you can't just reduce the number of bars without greatly affecting the calculations.
You can use SMA instead, but the results will be different. However, you need to understand the maths behind the RSI first, before you can substitute the EMA for SMA.
I have already explained that the way the RSI is calculated, based on EMA, you can't just reduce the number of bars without greatly affecting the calculations.
You can use SMA instead, but the results will be different. However, you need to understand the maths behind the RSI first, before you can substitute the EMA for SMA.
Thank you for your help, Im gonna try it
Realy appreciate
Are you sure you took this into account
before doing this
I would like to display only the specified bars by RSI in order to lighten the indicator, but it is not displayed well. How to display RSI for only specified of bars?
In any case, it's a pointless idea. The depth you are trying to limit is only calculated once after initialization. I think you are trying to save about a few milliseconds not with every tick, but only 1 time when attaching.
It's like trying to turn the ignition key faster in order to drive 1000 kilometers faster.