RSI calculation
RSI calculation
23 Sep 2018, 09:24
I am trying to verify the RSI indicator calculations and I am having trouble.
What is the code behind the RSI calculation in cTrader?
At some point it was posted but I can no longer find it. I beleive it is using an EMA and I do not understand why.
To my understanding the RSI is supposed to be calculated using the SMA of the profit and loss.
Can you please let me know.
Replies
PanagiotisCharalampous
25 Sep 2018, 16:01
Hi lec0456,
I don't know which code are you talking about but indeed this is how it is calculated. We will investigate why this is the case and come back to you.
Best Regards,
Panagiotis
@PanagiotisCharalampous
lec0456
23 Sep 2018, 09:46
Also, even if it is correct to use the ema. Why does the formula calculate the ema periodsd as:
var emaPeriods = 2 * paramPeriods - 1;
this would mean that instead of using 14 period ema it uses a 27 period ema to calculate a 14 period RSI
please verfiy and explain
@lec0456