![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
Hi,
as far as I have found all values that a customer-indicator can return has to be returned 'within' a buffer.
But what if I want to calculate one value on the whole chart like:
init() {
SetIndexBuffer(6, myBuffer);
}
start() {
..
double myVal = iMAOnArray( myBuffer, 0, ArraySize(myBuffer-OffSet), 0, MODE_SMA, 0);
..
}
Now I want to return maVal to my EA or have EA to read this.
There is no need (for me) the have myVal re-updated after each new tick, so I don't need a ExtMapBuffer - just a 'ExtMapVariable'.
Is this possible? How? Any Idea, anyone with code?
Of course I can draw this value as Level:
SetLevelValue(4,myVal);
But can I reed this level out of my EA?
Thanks iin advance,
Carl
PS I don't want to use Global Values - I guess to many wil probably needed.