How to retrieve PLOT_ARROW code and current Indicator Buffer Color from any DRAW_ARROW type indicator?
There are no colors or arrow codes from iCustom. EAs have no eyes.
Hi William,
How do you think that this indicator shows arrow used code ( Wingdings - Constantes de Objetos - Constantes, Enumeradores e Estruturas - Referência MQL5 - Referência sobre algorítimo/automatização de negociação na linguagem para MetaTrader 5 ) and colors used in my sample code ?
In first step, it list indicators that has two buffers with property_type DRAW_ARROW
After choose my sample indicator, it list buffers and values that I set on PlotIndexSetInteger(0,PLOT_ARROW,250); and PlotIndexSetInteger(1,PLOT_ARROW,230);
And sorry for my bad english.
Thanks for help!
![Documentação sobre MQL5: Constantes, Enumeradores e Estruturas / Constantes de Objetos / Wingdings Documentação sobre MQL5: Constantes, Enumeradores e Estruturas / Constantes de Objetos / Wingdings](https://c.mql5.com/36/55/documenta-o-sobre-mql5-constantes.png)
- www.mql5.com
IndicatorSetInteger(INDICATOR_DIGITS,_Digits);
double dynamicArrowcode; SetIndexBuffer(3,dynamicArrowcode,INDICATOR_DATA); dynamicArrowcode[i] =123.0; //Then formatting empty spots with EMPTY_VALUE
I think you have misunderstood William's post.
In the indicator itself you can set the arrow codes and the plot colours, however, from the EA retrieving the Indicator's buffer data, it is irrelevant what arrow codes were chosen or what colours. The EA can ONLY retrieve the buffer data and nothing else.
Also, the Indicators that are instantiated by an EA, do not display. It is hidden, so there are no colours or arrows to consider. That is why William stated that it is "blind". It does not see. Only the buffer data is available.
In your case the the first buffer will have the "Arrow Test Sell" values and the second buffer will have the "Arrow Test Buy" values, irrespective of arrow codes or plot colour or style.
I think you have misunderstood William's post.
In the indicator itself you can set the arrow codes and the plot colours, however, from the EA retrieving the Indicator's buffer data, it is irrelevant what arrow codes were chosen or what colours. The EA can ONLY retrieve the buffer data and nothing else.
Also, the Indicators that are instantiated by an EA, do not display. It is hidden, so there are no colours or arrows to consider. That is why William stated that it is "blind". It does not see. Only the buffer data is available.
In your case the the first buffer will have the "Arrow Test Sell" values and the second buffer will have the "Arrow Test Buy" values, irrespective of arrow codes or plot colour or style.
Dear Fernando,
Thanks for reply.
I understood what William's posted! And I knew that plot colour or style are in theory, unaccessable from EA.
But what I'm trying to say/show here is that I have an EA's .ex5 that read this data and I would like to understand how it is possible?
Perhaps I must make a youtube video to demonstrate it, because in this case I have some binary that make something that everybody is saing that is impossible.
No, it is not possible in normal MQL and even if done via DLL calls to Windows API, it would be very difficult!
If you have such an EA, then it is most likely that the colours and arrow codes are passed by the "input" parameters and not via the normal terminal properties. I have done that before for some of my indicators.
Another possibility, is when the indicator is using Graphical Objects instead of buffers, and there it is possible to retrieve the colours and the arrow codes of the objects, but not the buffers.
Which ever way you look at it, it is only possible if the Indicator uses and alternative method to allow access to those properties, but it is not possible for normal Indicators.
No, it is not possible in normal MQL and even if done via DLL calls to Windows API, it would be very difficult!
If you have such an EA, then it is most likely that the colours and arrow codes are passed by the "input" parameters and not via the normal terminal properties. I have done that before for some of my indicators.
Another possibility, is when the indicator is using Graphical Objects instead of buffers, and there it is possible to retrieve the colours and the arrow codes of the objects, but not the buffers.
Which ever way you look at it, it is only possible if the Indicator uses and alternative method to allow access to those properties, but it is not possible for normal Indicators.
Dear Fernando,
My code on this topic do not use Graphical Objects neither inputs. And the EA detect any color or code that I use on my source code.
You mentioned about use of Windows API, and I really d'ont know if the EA uses external dll's, because I haven't its source code.
But I d'ont know if is possible use Windows API without security alerts, and the EA d'ont issue this alerts. Do you know if is possible?
Without testing that EA of yours I cannot provide any answer to what it is doing. All I can say, is that it is not using normal standard methods of MQL to achieve that.
It may be probing the chart ".chr" files or using the "save template" as a way to read it from the template file, or some other indirect method. It may also happen that it is using some undocumented feature, but that seems highly unlikely.
Only by analysing and testing that EA could one perhaps find out how it is doing it.
EDIT: If this is a Market product (which can't be discussed here) and you wish to discuss it privately in order to analyse it, then you are welcome to send me a PM.
Without testing that EA of yours I cannot provide any answer to what it is doing. All I can say, is that it is not using normal standard methods of MQL to achieve that.
It may be probing the chart ".chr" files or using the "save template" as a way to read it from the template file, or some other indirect method. It may also happen that it is using some undocumented feature, but that seems highly unlikely.
Only by analysing and testing that EA could one perhaps find out how it is doing it.
EDIT: If this is a Market product (which can't be discussed here) and you wish to discuss it privately in order to analyse it, then you are welcome to send me a PM.
Dear Fernando,
You are The MQL5 Sherlock Holmes!!!
It's using ChartSaveTemplate - Operações de Gráficos - Referência MQL5 - Referência sobre algorítimo/automatização de negociação na linguagem para MetaTrader 5 and reading the tpl file of chart to discovery information!
<indicator> name=Custom Indicator path=Indicators\ArrowTest.ex5 apply=0 show_data=1 scale_inherit=0 scale_line=0 scale_line_percent=50 scale_line_value=0.000000 scale_fix_min=0 scale_fix_min_val=0.000000 scale_fix_max=0 scale_fix_max_val=0.000000 expertmode=0 fixed_height=-1 <graph> name=Arrow Test Sell draw=3 style=0 width=1 arrow=250 shift_y=-10 color=16776960 </graph> <graph> name=Arrow Test Buy draw=3 style=0 width=1 arrow=230 shift_y=10 color=65280 </graph> </indicator>
The tpl file contains < graph> tag with type (draw), arrow(PLOT_ARROW code) and color(color)!
Thank you so much for help!
![Documentação sobre MQL5: Operações de Gráficos / ChartSaveTemplate Documentação sobre MQL5: Operações de Gráficos / ChartSaveTemplate](https://c.mql5.com/36/55/documenta-o-sobre-mql5-opera-es.png)
- www.mql5.com
You are welcome!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear community,
I need a help to discover a way for dynamically identify the PLOT_ARROW code and Color used by DRAW_ARROW indicator type. My project is create an EA that sends orders using any DRAW_ARROW type indicator as buy/sell signal.
Here is a test indicator source code.
And here is the information that I have until this moment.
Thanks!