Are there any examples of custom data boxes?
I want to display some data to the user and have the user control its position via prefs but unsure the best way to do it.
Are there any examples of custom data boxes?
I want to display some data to the user and have the user control its position via prefs but unsure the best way to do it.
If you are talking about an actual external data box like the one in NinjaTrader where you right click the chart then it’ll be more complicated. However, if you just a table to show on the chart then here is an example. GitHub - WaleeTheRobot/range-box: RangeBox is a volatility-based indicator for NinjaTrader that visualizes recent price ranges in relation to the Average True Range (ATR), helping traders assess market regime and potential movement targets.
Hi, well that’s kinda what I mean except Draw.FixedText is pretty limiting.
I have a few indicators fighting for space in each corner etc. and it offers strict positing. Perhaps if I can figure out how to make it appear / disappear with some mouse actions or clicking a better that would be better.
I’m not sure what you mean by limiting, but you might be able to work around that or a rectangle with offsets. You can also look at using SharpDX for the table. order-flow-stats/OrderFlowStats.cs at main · WaleeTheRobot/order-flow-stats · GitHub
Limiting because it only offers basic positioning with no option for margins.
If 2 indicators are using Draw.TextFixed with the same position(ie BottomLeft), they sit on top of each other.
If you want full control over size, orientation, placement, etc, the only way to do it is with SharpDX. If you haven’t used SharpDX, take a look at the SampleCustomRender indicator. It should give you a good idea how to get started. If you have specific questions, please post them here and I’ll be happy to assist.
One suggestion I would make is: if you’re planning to have formatted text with columns or decimal points lining up, etc, I recommend using a fixed font like Consolas to make the output look clean and aligned. The other fonts will compress spaces and make the output look jagged.
Hope this helps.