Could you describe please, what you try to achieve? The goal is not clear at all. I cannot devine it from the various code snippets.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Have to hit F5 refresh
Collapse
X
-
-
I`m trying to achieve just that.to control the upper and lower margin of the Y scale.What additional information you need to compose a prototype of your custom plot?Please,let me know.Originally posted by Harry View PostBut if you wish to control the upper and lower margin you need to do it via a custom plot and not in OnBarUpdate.
Could you describe please, what you try to achieve? The goal is not clear at all. I cannot devine it from the various code snippets.
btw,almost all parts already in this thread.
Sincerely
Comment
-
Hello outsource,
I need to add in that overriding the Plot() is not supported by NinjaTrader to do.
Also, using ChartControl is not supported by NinjaTrader as well.
That said, the Plot() method triggers whenever something changes on the chart. If the chart is clicked, moved, a tick is received. Think of this as the OnRender() method.
This will trigger on a change and will not require that F5 be hit on your keyboard. You can test this by printing outside of any conditions on the first line of the Plot override.
Also, Close[0] is available to the Plot override (you can test this as well by printing outside of any conditions on the first line of the Plot override).Chelsea B.NinjaTrader Customer Service
Comment
-
Even if Close[0] is available to Plot override, it is not at all useful for vertical scaling or anything else. When you are connected to a data feed and scroll back horizontally, Close[0] designs the current bar and not the last bar shown on the chart. When my chart shows a section from March, how can I scale the chart to match the prices by using the Close from April 22 ?Originally posted by NinjaTrader_ChelseaB View PostAlso, Close[0] is available to the Plot override (you can test this as well by printing outside of any conditions on the first line of the Plot override).
To adjust the scale based on the close value of the last bar shown on the chart, one would need to access the close value for the last bar index. I have tried Close.Get(this.LastBarIndexPainted), but this does not work: However, it is possible to replicate the Close with a DataSeries object and then access the value as replicatedClose.Get(this.LastBarIndexPainted).
Again, Close[0] cannot be used within the custom plot, as it refers to the current bar, which may have nothing to do with the section of the chart actually shown on the screen.Last edited by Harry; 04-22-2015, 09:58 AM.
Comment
-
To control those, you need to use the unsupported, undocumented GetMinMaxValues() method.Originally posted by outsource View PostI`m trying to achieve just that.to control the upper and lower margin of the Y scale.What additional information you need to compose a prototype of your custom plot?Please,let me know.
btw,almost all parts already in this thread.
Sincerely
Here is the previous answer that I gave: http://www.ninjatrader.com/support/f...482#post320482
Comment
-
So,in other words,with this unsupported method i should keep my chart on the foreground at all times,in order the scale not to jump up and down,and would need ~80 laptops for ~80 markets to monitor?Am i correct?Originally posted by NinjaTrader_ChelseaB View PostHello outsource,
I need to add in that overriding the Plot() is not supported by NinjaTrader to do.
Also, using ChartControl is not supported by NinjaTrader as well.
That said, the Plot() method triggers whenever something changes on the chart. If the chart is clicked, moved, a tick is received. Think of this as the OnRender() method.
This will trigger on a change and will not require that F5 be hit on your keyboard. You can test this by printing outside of any conditions on the first line of the Plot override.
Also, Close[0] is available to the Plot override (you can test this as well by printing outside of any conditions on the first line of the Plot override).
Comment
-
No you are not correct. Nobody mentioned that it is necessary to keep your chart in the foreground. Also you would not need 80 laptops, but you would just need a few more skills, if you wish to code your own indicators.Originally posted by outsource View PostSo,in other words,with this unsupported method i should keep my chart on the foreground at all times,in order the scale not to jump up and down,and would need ~80 laptops for ~80 markets to monitor?Am i correct?
Rather than annoying us with naughty comments I would suggest to follow a course in C# and then study the code already available. Also, if you need some help you should disclose the information necessary for allowing to answer your questions. Alternatively, you could search for somebody to do the job for you.
Comment
-
@NinjaTrader_ChelseaB
May i ask once again the Support to confirm,that the indicator(the way it`s coded and the methods that were used) will only work correctly,as far as the Y axis issue is concerned,on the foreground,and if i move,minimize,or overlap the chart with other window and then bring the chart with the indicator back,it may cause change/errors/failurs in contrast to the originally set parameters?Hence,having to use 80 laptops for each indicator,to have it on the foreground,to have it stable, still prevails?
Thank you
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
578 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment