Are the settings for the iRSI call the same as the settings for the RSI on the chart?
Please note that using this could result in an attempt to create an object with the same name as an existing object as it's quite possible for the value to be the same as a previous one. If this happens, the object will not be created.
string s = DoubleToStr(rsiPeak, 1); ObjectCreate(s, OBJ_TEXT, 0, Time[lastPeak], Close[lastPeak]);
int BarsNotToCheck = Bars - 30; for(int i = Bars - BarsNotToCheck; i >= 0; i--) { price[i]=iClose(NULL,0,i);Same as "for(i = 30" but price only has elements 0 .. 29
Guys,
re is the code. Please help, what went wrong?thanks for your inputs Gents,
1. Regarding the buffer size there is something i dont get. It supposed to collect 30 closing prices but if i code:
double price[30]; for(int i = 1; i <= 30; i++)
it returns "array out of range". When i change:
for(int i = 1; i < 30; i++)
everything goes well.
2. Regarding the RSI settings - this is for sure RSI indicator, i checked with different broker and it draws the same line with the same data.
I didnt mention i use different platform tham MT4 (its so called AlgoStudio but using MQL4). Funny thing - copying my robot to MT4 it returns correct RSI value and works perfectly (still shitty regarding the income;))
Gues i will have to get in touch with this AlgoStudio folks...

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Guys,
i give up. I've been trying to code EA placing orders depending on price peak and certain RSI value. Thing is, my EA works bad like hell but what concerns me more is that RSI values it put on price chart are different than RSI indicator values. Why?
Picture attached shows my problem: robot draws the text near the peak bar with RSI values he thinks it is, i added manualy the real RSI values from indicator underneath.
Here is the code. Please help, what went wrong?