I was searching for some example that shows how to handle the situations where you have multiple plots (line plots in this case with variable values) in 1 single indicator but the plots are all in different price/numeric scales, where at some specific time you could have the next values shown on the chart.
The next is not NinjaScript code, is just to have the visual idea about what kind of numerical values scales you could be seeing during a specific time in the chart.
Values[0][0] = 850.00
Values[1][0] = 10,700.00
Values[2][0] = 15.00
Values[3][0] = 85,000.00
…
Values[N][0] = 1,00,000.00
And for example, the line of code ‘ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Overlay;’ works as should when you need to have 2-3 indicators in the same panel, or when you previously have the instrument price and you need to plot an indicator that be “overlaid” in relation to that instrument graph, but what about if the situation is you have these multiple plots inside 1 single indicator instance and each plot has its own price marker scale as the numbers above.
I know maybe a kind of patch would be to have multiple instances of the indicator with each one showing one of the plots but I don’t feel it would be a real solution but the most important is that where you have more than 3 plots with different price scale then I don’t know how to handle those cases where the 3 basic possibilities are taken, for example:
- Plot0 -> Right Justification
- Plot1 -> Left Justification
- Plot2 -> Overlay Justification (floating in the right price scale)
- But what about Plot4, Plot5, PlotN, … where I need all them to be shown in the same chart panel with only 1 indicator instance?
A possible solution would simply be to be able to have a kind of separate instruction for each plot where you can specify the plot will overlaid in its own numerical scale that is totally independent from any other plot either be in the same scale or in a very different price scale. Something like:
//Not real code, just the basic idea.
ScaleJustificationMain = NinjaTrader.Gui.Chart.ScaleJustification.Right //The principal “base scale”. If needed
ScaleJustificationPlot1 = NinjaTrader.Gui.Chart.ScaleJustification.Overlay
ScaleJustificationPlot2 = NinjaTrader.Gui.Chart.ScaleJustification.Overlay
ScaleJustificationPlot3 = NinjaTrader.Gui.Chart.ScaleJustification.Overlay
…
ScaleJustificationPlotN = NinjaTrader.Gui.Chart.ScaleJustification.Overlay
But of course I haven’t seen anything similar to this for the moment, so please help me to handle this kind of situations.
Please note the indicator is working perfectly as should for now, and the only problem is this part about to graph the multiple plots in the chart where due the very different price scale actually they are shown as a kind of straight horizontal lines where the reality is that each plot (each line) has swings or zig-zags exactly as any instrument plot/graph has. If it helps please just think you have a kind of multiple SMA lines with very different price scale and you need each of them be shown “in its own scale” with each of them being plotted in a kind of floating price marker or something like that.
Thank you in advance!
Comment