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
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Have to hit F5 refresh
Collapse
X
-
-
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
-
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
-
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
-
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
-
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 warreng86, 11-10-2020, 02:04 PM
|
7 responses
1,360 views
0 likes
|
Last Post Today, 09:41 PM | ||
Started by Perr0Grande, Today, 08:16 PM
|
0 responses
5 views
0 likes
|
Last Post
by Perr0Grande
Today, 08:16 PM
|
||
Started by elderan, Today, 08:03 PM
|
0 responses
9 views
0 likes
|
Last Post
by elderan
Today, 08:03 PM
|
||
Started by algospoke, Today, 06:40 PM
|
0 responses
10 views
0 likes
|
Last Post
by algospoke
Today, 06:40 PM
|
||
Started by maybeimnotrader, Today, 05:46 PM
|
0 responses
14 views
0 likes
|
Last Post Today, 05:46 PM |
Comment