Objects in Hacker EX5 - MetaTrader 5 Script | Forex Indicators Download - MT4/MT5 Resources




This code demonstrates how to modify objects in the indicator without source code. There are some indicators that do not use buffers, they only use objects. It would be easy if the input could be changed using iCustom, but this is only possible if the indicator uses a buffer to draw elements. What if the indicator only uses objects?
In the demo, the MT5 free market indicator named "PZ Multidiagonals MT5" is used. Before trying to test this code as-is, you need to install this indicator from the market.
We need an object prefix name to start manipulating the object. The function LogChartObjectNames() was created to log the names of all objects present in the indicator.
Then use the ModifyChartObjects() function passing two parameters to manipulate the objects. A prefix name (which should be the beginning part of a descriptive object name) and an integer passing the number of objects that should be unmodified or "retained" for that particular object.
The PZ Multi Diagonal Indicator is a trend indicator that automatically draws trend lines, but it goes a little too far. The default preset looks like this:
It is obvious from the data window that this indicator does not use any buffers. Everything is built with objects.
Now, starting from a clean chart, load this indicator "Hacking Objects.mq5" and you will see how I removed a lot of trend lines and left what I think is the most relevant, not by accessing the inputs, but by hacking objects:
Attachment download
📎 hacking_objects.mq5 (4.12 KB)
Source: MQL5 #50895
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •