1° You have to use an ENUM not an int
ENUM_TIMEFRAMES mPeriod[NUMBER_OF_SYMBOLS]; // Period
2° You can use a struct. See this topic.
angevoyageur:
Ah yes of course.
1° You have to use an ENUM not an int
Thanks a lot :)
I just wanted to upload the edited version with the tips from angevoyageur.
It works just like I wanted to.
Files:
MultiRSI_v1.mq5
4 kb
MultiRSI_v2.mq5
4 kb
YANND:
I just wanted to upload the edited version with the tips from angevoyageur.
It works just like I wanted to.
Hi my
Please check below code
if(Use_Symbol[s]!=false) { ArraySetAsSeries(rsi[s].ar,true); CopyBuffer(rsi_handle[s],0,0,3,rsi[s].ar); BuyCondition[s] =(rsi[s].ar[s]<30); // rsi[s].ar[s] ? rsi[s].ar[2] SellCondition[s] =(rsi[s].ar[s]>70); // printf("Symbol %s %f %f %f " }
why you used rsi[s].ar[s]
kourosh1347:
Hi my
Please check below code
why you used rsi[s].ar[s]
Haha. I’m not really sure why. This is the first time I use such a code.
I tried the EA on visualmode and he works like I wanted so I decided to let the code like this.
Why is something wrong with it? I don’t understand your correction.
thx

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello
I just programmed my first Multi-Currency EA. Its working but there are 2 thing I don't know how to use.
The first thing is to Inizialize the RSI indicator with a changeable Timeframe:
Why cant I use the Array mPeriod[s] instead of PERIOD_H1?
It gives me an compiling error "mPeriod'- can't convert enum" .
I tried some things but I didn't figured it out.
And second thing:
For the rsi Price I use one array/Pair.
Isn't it possible to make a 2 dimensional array so that I can use the code on the OnTick() function in an for loop like I do with the other stuff? But I don't know how to set 2 dimensional array. Can someone explain it to me?
Thanks a lot :)