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
Force update OnRenderTargetChanged
Collapse
X
-
Force update OnRenderTargetChanged
Hi, how can I update the OnRenderTargetChanged() after renew a variable? my problem is the following: I have a brush (transparency) which I update via a variable in the OnMarketData() method. Now the opacity of the brush used in OnRender() should change immediately and without delay accordingly. Unfortunately, the OnRenderTargetChanged() is only called when something happens to the chart, but that's too late.
Tags: None
-
Hello sidlercom80,
Thanks for your post.
We must update DX brushes OnRenderTargetChange since DX brushes are device dependent (depend on the RenderTarget.) This does not mean this is the only place we should update our brushes. If, for example, a brush needs to be updated before the RenderTarget changes, you can use logic in OnRender to see if your brush needs updating, and then you can update the brush then so it is updated in the next render pass.
I do something like this in my LabeledLines DrawingTool extension using bools to notify if a brush needs to be updated outside of a RenderTarget change.
This is an expansion of the the NinjaTrader Lines Drawing Tool(s) that adds text boxes to each line that will show prices associated with the endpoint or where the line crosses the price scale. Vertical lines will show time stamps. Your own messages can be added to each text box. New settings can be set […]
The link above is publicly available.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Let us know if there is anything else we can do to help.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
10 responses
1,767 views
0 likes
|
Last Post
by Leafcutter
Today, 03:01 AM
|
||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, 04-23-2024, 07:51 PM
|
2 responses
30 views
0 likes
|
Last Post
by Max238
Today, 02:25 AM
|
||
Started by Shansen, 08-30-2019, 10:18 PM
|
24 responses
943 views
0 likes
|
Last Post
by spwizard
Today, 01:29 AM
|
||
Started by Max238, Today, 01:28 AM
|
0 responses
9 views
0 likes
|
Last Post
by Max238
Today, 01:28 AM
|
||
Started by rocketman7, Today, 01:00 AM
|
0 responses
7 views
0 likes
|
Last Post
by rocketman7
Today, 01:00 AM
|
Comment