MT5 - show positions on custom chart

1
Here is an indicator that shows open positions on an MT5 custom chart. The BaseSymbol input must be set at a real/tradable chart symbol. The adjustable input controls the location of the position text in bars back (into chart history). Although this indicator merely shows open positions for the current chart symbol, another coder can make more sophisticated use of the source code by adding additional position property conditions to the code. I've left calls to additional position properties active for this purpose, even though my conditions don't make use of them. Just keep in mind that in MT5, there are orders, deals, and positions... unlike MT4.

These users thanked the author JohnnyRy for the post (total 2):
TransparentTrader, Starfish
“[A]s we know, there are known knowns—there are things we know we know. We also know there are known unknowns—that is to say we know there are some things we do not know. But there are also unknown unknowns—the ones we don’t know we don’t know.”—Donald Rumsfeld, 2002


Re: MT5 - show positions on custom chart

2
Introducing... version 2 supporting all positions, integrated stops, and independent pending orders:

These users thanked the author JohnnyRy for the post (total 2):
Starfish, TransparentTrader
“[A]s we know, there are known knowns—there are things we know we know. We also know there are known unknowns—that is to say we know there are some things we do not know. But there are also unknown unknowns—the ones we don’t know we don’t know.”—Donald Rumsfeld, 2002

Re: MT5 - show positions on custom chart

3
Quick update... I found that I missed a specific type of stops--stops that are integrated into a main pending order. Fixed in version 3:

EDIT: I replaced this file once without a changing the version due to a cosmetic label bug. At that time, there was already 1 download. Please download again.
These users thanked the author JohnnyRy for the post:
TransparentTrader
“[A]s we know, there are known knowns—there are things we know we know. We also know there are known unknowns—that is to say we know there are some things we do not know. But there are also unknown unknowns—the ones we don’t know we don’t know.”—Donald Rumsfeld, 2002


Who is online

Users browsing this forum: ChatGPT [Bot], SEMrush [Bot] and 6 guests