
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
Your question in #2 is about an EA. What part of "There are no IndicatorCounted()" is unclear?
Hi whroeder,
Maybe I'm wrong or I don't really understand how this works, but there is an IndicatorCounted() right at after the start() function.
Isn't this what you are saying? If not, I guess I don't understand the real use of this or I'm not understanding you.
Thank you for your patience.
You can move the indicator logic into your EA but this requires quite some experience. You'd have to check when a new bar emerges and do the resizing of vol_t on your own. Should the EA be reloaded, all of those previously computed indicator values within vol_t would be gone.
Hi lippmaje! Thank you for your answer.
How!! How can I do that! haha I'm trying but I can't manage it to work :(
So frustrating haha.
Hi lippmaje! Thank you for your answer.
How!! How can I do that! haha I'm trying but I can't manage it to work :(
So frustrating haha.
Why being frustrated about that if you have iCustom at least?
First, you need to detect when a new bar emerges. That is programmatically easy to handle and I advise you to search for it. I have no link at hand at the moment.
The more tricky part is to resize your array, so that vol_t[0] becomes vol_t[1], that is:
Now, if you resize vol_t by +1 this would look like: ArrayResize(vol_t, ArraySize(vol_t)+1)
This is ok, but the problem here is that the new array element is at the bottom. But what you need is the new element at the top (vol_t[0]). You can handle this by reverting the array ordering before and after the resize operation.
Like so:
This is part two of the three problems I mentioned earlier. Part one, you have to find a solution for IsNewBar(), part three, what do you do if the EA is reloaded and all the content of vol_t is gone. Think about this, and bear in mind that you are not experienced in coding. I still advise that you stay with iCustom.
Isn't this what you are saying? If not, I guess I don't understand the real use of this or I'm not understanding you.
Use the publicly released code - Expert Advisors and Automated Trading - MQL5 programming forum