I’m developing an MT5 strategy, and whenever my Buy or Sell condition is satisfied, I’d like to display an arrow or some symbol on the chart exactly at that candle.
For example, if a breakout happens, I want to draw a green up arrow below the breakout candle. Likewise, when a Sell signal occurs, I want to draw a red down arrow above the candle.
Whenever your strategy generates a signal, simply call DrawObject() with the appropriate parameters, and MT5 will plot the symbol on the chart automatically.
You can also customise the symbols by changing the OBJPROP_ARROWCODE values. MT5 supports many different Wingdings symbols such as arrows, flags, stars, circles, check marks, and more.
The DrawObject() function shown above is a reusable helper built using the official MQL object documentation. You can explore all available symbol codes here:
You can replace the arrow codes with any Wingdings code you like to display different symbols on your chart. This makes it easy to visually mark breakouts, entries, exits, reversals, or any other event generated by your strategy.
Verified Solution
This is exactly what I am looking for, now I can be able to plot symbols in the MT5 also like TradingView. With the custom function it’s super easy to plot symbols and if we want to plot any new symbol then we will just have to add the code of that and that’s it. So, it’s really help me a lot!– Radhesh JoshiJul 28