Hi,
I have been working on building an EA and custom indicator. In the custom indicator I set up some buffers to display lines across the chart and a few Objects to show information like the spread, distance between lines, etc. In the top right corner of the chart I have my objects displayed, so it displays something like "Spread: X.X Pips". In my EA I wanted to have the Object information available to me as well so that I can do math with it.
My EA is only a few lines long right now. I basically pull two values from buffers that were in the custom indicator using the iCustom function. I noticed something strange about this. If I open a brand new chart window and do not load anything but my very short EA into it, I get all of my objects showing in the upper right corner that I created from my custom indicator. I don't even have code in my EA to display them onto the screen. I just have the two iCustom functions that are setting a value to a variable.
Does this sound normal? Or am I doing something wrong with the MetaTrader software itself?
Have a read of this: https://www.mql5.com/en/forum/146633
The iCustom() call calls the Indicator . . . the Indicator draws the Objects. Be careful about doing it this way, the Objects that is, you may have issues when it comes to the Strategy Tester.
Have a read of this: https://www.mql5.com/en/forum/146633
Do you think I would be better off having the custom indicator only do the buffers and doing the object work inside of the EA? Thank you for the link.
Do you think I would be better off having the custom indicator only do the buffers and doing the object work inside of the EA? Thank you for the link.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I have been working on building an EA and custom indicator. In the custom indicator I set up some buffers to display lines across the chart and a few Objects to show information like the spread, distance between lines, etc. In the top right corner of the chart I have my objects displayed, so it displays something like "Spread: X.X Pips". In my EA I wanted to have the Object information available to me as well so that I can do math with it.
My EA is only a few lines long right now. I basically pull two values from buffers that were in the custom indicator using the iCustom function. I noticed something strange about this. If I open a brand new chart window and do not load anything but my very short EA into it, I get all of my objects showing in the upper right corner that I created from my custom indicator. I don't even have code in my EA to display them onto the screen. I just have the two iCustom functions that are setting a value to a variable.
Does this sound normal? Or am I doing something wrong with the MetaTrader software itself?
Thank you!
F