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 | ||
---|---|---|---|---|
Started by frankthearm, Yesterday, 09:08 AM
|
14 responses
47 views
0 likes
|
Last Post Today, 02:19 PM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 02:05 PM | ||
Started by Kaledus, Today, 01:29 PM
|
2 responses
8 views
0 likes
|
Last Post
by Kaledus
Today, 02:04 PM
|
||
Started by PaulMohn, Today, 12:36 PM
|
2 responses
16 views
0 likes
|
Last Post
by PaulMohn
Today, 01:48 PM
|
||
Started by Conceptzx, 10-11-2022, 06:38 AM
|
2 responses
56 views
0 likes
|
Last Post
by PhillT
Today, 01:47 PM
|
Comment