
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
I can imagine a lot of variants of what exactly you need. you need clarifications. a lot of clarifications.
you have an indicator, which buffer contains Close prices of bars.
you want to call another indicator from this indicator (e.g. MA) and feed the Close buffer to it.
question -
- at what stage of Close calculation do you plan to do this?
- where do you plan to get the result of that second indicator?
Hi,
This is a very good article but I have some questions.
1. Only the indicators that uses the short form of the OnCalculate() function call, can be applaied to another indicator or the indicators that use the long form of the OnCalculate() function call can be applied too? If so , haw can be applied one indicator with long form of the OnCalculate() function call, to another indicator???
2. Applying one indicator to another (TSI over RSI) generates some display problems (see attached image). While RSI is plotted from 0 to 100 the second indicator (TSI) have values below 0 too , values wich are not visibile on the chart. Wich is the problem and why the chart don't properly adjust to display correctly both indicators. Can we solve this problem or it's a MetaTrader bug???
1. Yes only indicator that uses the short form of OnCalculate can be applied to another indicator data.
2. You have to edit to properties of RSI indicator and change "Fixed minimum" on the Scale tab to -50 instead of 0.
Alexey,
Thank you for your time.
According to the documentation it is necessary to pass the OTHER indicator handle,
and I spoke out for the possibility to process the buffer of the Ongoing indicator.
Further.
It is possible to pass the OTHER indicator handle, but I have not found where to specify which buffer should be used.
I can imagine a lot of variants of what you need. you need clarifications. a lot of clarifications.
you have an indicator, which buffer contains Close prices of bars.
you want to call another indicator from this indicator (e.g. MA) and feed the Close buffer to it.
question -
- at what stage of Close calculation do you plan to do this?
- where do you plan to get the result of that second indicator?
A lot of clarifications:
To make my explanation more clear, let's turn to the writing of MACD indicator under the condition that it is not in MT5 delivery.... But there is iMA with the possibility to pass the indicator handle as a price constant. But here is the problem, for this we need to write an indicator of the difference of MA values and separately to it, having received the handle, to make a signal line. But there is no possibility to use iMAOnArray() inside, as in mql4.
More clarifications:
According to some formula, we got the values of the indicator buffer 0. Then we need to calculate the average of these values. There are no other options to calculate by your own formula? In the MovingAverages.mqh inclusion the same formulas. This is not the option I would like to find out.
Others have a lot of clarifications:
We have a custom indicator with two or three buffers. The task is to calculate the average of buffers 1 and 2 separately. Having received the handle of such an indicator, it is possible to get the values of these buffers by means of CopyBuffer(), but there is no possibility to send them to iMA. What should I do?
If you don't mind... The question is not to get the result, but to understand how to use the possibility to transfer the handle of another indicator to some technical indicators and what you can and cannot get.
Alexey Viktorov:
We have a custom indicator with two or three buffers. The task is to calculate the average of buffers 1 and 2 separately. Having received the handle of such an indicator, it is possible to get the values of these buffers using CopyBuffer(), but there is no possibility to send them to iMA. What to do?
To make a wrapper around this indicator, which copies a certain buffer, under the number specified by an additional parameter in the properties.
And it is its handle that should be transmitted.
Make a wrapper around this indicator, which copies a certain buffer, under the number specified by an additional parameter in the properties.
And that's exactly its handle and pass it.
As I understood, on the basis of this copied buffer make an indicator, and then, having received its handle, you can use the received data in the next indicator. Or is it not so?
As I understood, to make an indicator on the basis of this copied buffer, and then, having received its handle, you can use the obtained data in the next indicator.
Yes, sort of.
And here's such a crazy idea: If an indicator is attached as a resource, is it possible to get its handle? Can't it be crossed. In order not to carry two indicators, the indicator itself and the indicator from this indicator. I haven't practised resources, so it's hard for me to check, so I'm asking.
Compared to iMAOnArray() from mql4, it's a tambourine dance.
And here is such a crazy idea: If an indicator is attached as a resource, is it possible to get its handle? Can't it be crossed. In order not to carry two indicators, the indicator itself and the indicator from this indicator. I haven't practised resources, so it's hard for me to check, so I'm asking.
I think it's a real tambourine dance, in the current implementation :)