![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Wow, I am not yet so advanced. Good clue. I have to read it later, now is the time to give a lift kids from schools.
There are a lot of features I missed...
I wonder why an event such as OnTradeAction, or OnAccountBalanceChange ...etc is not thought of.
It's very important when such an event occurs and we know to react with trading. Any thoughts?
Cung
If I prefer to include indicator calculation into EA rather than the iCustom call, probably the easiest way is setting correct parameters for OnCalculate() function.
Did anyone already invest some effort into coding? I guess it should use CopyClose(), CopyHigh() etc. to create the parameter arrays, but I am not familiar with them. I found an article about inclusion of indicators, which might help.
In OnCalculate(), the use of prev_calculated and rates_total just replicates the old IndicatorCounted() function and Bars. The other parameters passed to it are the same as are in the series arrays. I dont really see the point of the change. But anyway, you can use the regular High[] Low[] etc series arrays and make the equivalent of indicator buffers by identify first tick of newbar and use ArraySetAsSeries() and ArrayResize(). You probably dont need to size the arrays to the entire chart like you would in a real indicator, just big enough to cover lookbacks.
In OnCalculate(), the use of prev_calculated and rates_total just replicates the old IndicatorCounted() function and Bars. The other parameters passed to it are the same as are in the series arrays. I dont really see the point of the change. But anyway, you can use the regular High[] Low[] etc series arrays and make the equivalent of indicator buffers by identify first tick of newbar and use ArraySetAsSeries() and ArrayResize(). You probably dont need to size the arrays to the entire chart like you would in a real indicator, just big enough to cover lookbacks.
I don't see the point of the change either, especially as the new arrays can't be used easily outside of OnCalculate and not used at all in EAs and Scripts.
Added to which errors such as mistyping High[i] instead of high[i] can mess things up big time and the compiler will not detect the error.
I don't see the point of the change either, especially as the new arrays can't be used easily outside of OnCalculate and not used at all in EAs and Scripts.
Added to which errors such as mistyping High[i] instead of high[i] can mess things up big time and the compiler will not detect the error.
I wonder why an event such as OnTradeAction, or OnAccountBalanceChange ...etc is not thought of.
It's very important when such an event occurs and we know to react with trading. Any thoughts?
Cung
You could give the suggestions to Service Desk at mql5.com
Thanks deysmacro, I will try
You can manage your own custom events, see EventChartCustom.
Hmm,
I am not sure I made myself clear. E.g when your trade gets stop triggered, how would you know if the system does not fire an event?
You could give the suggestions to Service Desk at mql5.com
Could you or somebody send me the link to such Service Desk? I could not find a clue.