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
Dear friends:
Do you know how to implement it?
thanks!
Does anyone can help me?
thanks!
thank your help, the value of RSV is correct.there is another question,please see the code.
the percentK[i] value is -0,why?
Bars is going to be greater than limit for H1 and smaller timeframes, so why are you using Bars in your iMAOnArray ? also in that call, what is M1 ? You need to look carefully at the syntax for https://docs.mql4.com/indicators/iMAOnArray
Thinking out loud and put to text just to see if I can understand this logic
Where did you put your print statements to see this value of -0 ? in the loops, after the loop before the loop ?
And so iMAOnArray(RSV,Bars,M1,0,MODE_SMA,i); what is RSV ?The for loop terminates when i++ = limit which is set to 512
so the condition becomes false when i==512 right ?
Shouldn't this be (RSV[], or perhaps ( RSV[512].... or something
So in this case percentK[i]=iMAOnArray(RSV,Bars,M1,0,MODE_SMA,i) should produce 0 value if it's expecting an array RSA[] or RSA[i] or something ?
Anyhow thats what I'm coming up with as my NooB logic would provide
And of course what RapturUK suggested about the the syntax as well PERIOD_M1, PERIOD_H1 etc. OR use 0 to select the current time frame
Hope this helps
And of course what RapturUK suggested about the the syntax as well PERIOD_M1, PERIOD_H1 etc. OR use 0 to select the current time frame
thank you, all friends!
the code which has been attached is a part.
the logic is as follow:
1)define two global array RSV and RSV,
2)calculate the value of RSV element, because the size of RSV is 512,if the bars of chart has more than 512, calculate the last 512 bars.
3)calculate the value of percentK by simple moving average
4)print the value of percentK,but the value of them is -0.
if the logic is clear?
By the way, you mean the first parameter should not be RSV?
thanks!
3)calculate the value of percentK by simple moving average
4)print the value of percentK,but the value of them is -0.
limit=Bars-counted_bars;
Initially counted_bars (fromIndicatorCounted()) will be zero so you are accessing beyond the arrays. Limit=Bars-1-counted_bars;Доброго времени суток уважаемые форумчане!
Меня зовут Герман, мне 23 года, я являюсь трейдером компании "Инстафорекс"
Помогите в поиске нужного скрипта! Скрипт нужен для сетки отложенных ордеров.
Dear friends:
thank you very much!
thanks!