Winning Entry March 1st, 2025 to April 1st, 2025 [1 votes]

Here is a sample of a panel button that turns an indicator visibility on/off via a 'click'. You do not have to refresh the chart each time.
Version 3.2
* Fixed for NT8b9. Recent NT8 changes to multi-threading created freezing when the chart was loaded.
I was so used to my MarketDelta buttons that I had to do it for NT8 .
This indicator draws an EMA both via the Plot method and the OnRender method so you can see the code for both techniques.
Thank you very much to "Edge" for the original "button" code and help.
Version3 - Nov 2015:
* Used 'UserControlCollection' instead of 'ChartControl' for safer usage and it does not interfere with the bars or plotting.
* Created smaller button.
* You can have up to 10 buttons per panel (or more if you change the code). So you can add 10 ema's and specify which position you would like via 'Column#'.
* Buttons are hard-coded to plot at the top-left of the panel but you can change this in the code if you like via 'myGrid'.
* The button will appear within the panel the indicator is plotted. Please read the 'summary' at the top of the code for limitations of usage. Use at your own risk.
Version 3.1
* Fixed bug that prevented button working when state changed from Historical to RealTime.
Sim22
Category NinjaTrader 8 Indicators and More
|
|
|