I cannot get the indicator to work properly in Metatrader 5.
First, it draws the market profile sometimes, other times it just doesn't do anything.
Please make sure you downloaded the latest version from the website because MetaTrader 5 is still getting a lot of updates, which may create bugs in previously working MT5 indicators. The latest version of MarketProfile should work fine with the latest build of MT5.
Please also remember that the indicator only works on M5, M15 and M30 timeframes.
Second, when the indicator does draws the market profile, it seems it uses random times for day start and end times. Example, today's market profile chart starts at 16:00 and ends at 11:00, yesterday's ended at 12:00. On other days it ends at 13:00.
Could you please show some screenshots and the input parameters that you use? I can't reproduce such behavior.
Third, you are calculating the Point of Control as if it were the Median. It is not the Median but the Mode that makes the Point of Control.
Although, it's called Median in the code and in the input parameters, in fact it's a Mode - the price with the maximum number of TPOs. I named it Median, because, if there are several price levels with the same number of TPOs, the one closest to the center of the range will be chosen.
Can you make a better one and how much would you charge for it?
Sorry, I do not code for money, but I will consider making any reasonable changes and bugfixes to my indicators.