Histogram at the right margin

 
Hi, I'm working on an EA to define how many times a price is beaten, I would like to create a histogram attached to the right side of the chart that is visible even on timeframe above one minute, 
I tried different solutions but I can not create something that is positions on the far right side, any solution?
Histogram

 
Giusto Moreno: Hi, I'm working on an EA to define how many times a price is beaten, I would like to create a histogram attached to the right side of the chart that is visible even on timeframe above one minute, I tried different solutions but I can not create something that is positions on the far right side, any solution?

Always search the Codebase for examples. Here is one such recent example that can help as it also has a volume profile on the far right: https://www.mql5.com/en/code/23032

Volume Profil & Range V6
Volume Profil & Range V6
  • www.mql5.com
Volume Profile + Range v6.0 (former TPO). Distribution of deals by price levels at a given time interval. Displayed as a histogram. The width of the histogram at the level means the number of transactions carried out on it. If a broker provides data on a real volume, the indicator is able to display distribution on it as well. Original codes is here https://www.mql5.com/en/code/15440 but it doesnt work on new builts of MT5 I just compiled for new builts
 
Fernando Carreiro:

Always search the Codebase for examples. Here is one such recent example that can help as it also has a volume profile on the far right: https://www.mql5.com/en/code/23032


Thank you !
Reason: