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
timezonecolor from NinjaTrader_Jesse
Collapse
X
-
timezonecolor from NinjaTrader_Jesse
I get the last few days a strange message, although I use this indicator already a long time. I watched in the code but have no clue what the problem is.
Tags: None
-
Hello marcus2300,
This conversion dynamically creates brushes within the script's OnBarUpdate method. On a chart where a lot of data is loaded, the script can have the potential to create over 65535 brushes, which would exceed the limit for Windows Media Brushes.
The script could be modified so that the RGB values it creates for the brushes are normalized to smaller range than 255. For example, if the each RGB value is limited to 0-40 instead of 0-255, the number of brushes that the scripts can make would be less than this limit (1 * 40 * 40 * 40 < 65535) or ( A * R * G * B < Number of possible brushes)
We wanted to keep the script consistent with the original NinjaTrader 7 version and decided to leave the script's logic as is since this error would only be encountered when the script is used for a long time or on a chart with a lot of data.
If there is enough impact here, we can make changes, but this would reduce the "color resolution" and limit the appearance of the indicator.
Let us know if you have any questions.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Barry Milan, Yesterday, 10:35 PM
|
5 responses
16 views
0 likes
|
Last Post Today, 05:37 PM | ||
Started by DanielSanMartin, Yesterday, 02:37 PM
|
2 responses
13 views
0 likes
|
Last Post Today, 05:26 PM | ||
Started by DJ888, 04-16-2024, 06:09 PM
|
4 responses
13 views
0 likes
|
Last Post
by DJ888
Today, 04:28 PM
|
||
Started by terofs, Today, 04:18 PM
|
0 responses
11 views
0 likes
|
Last Post
by terofs
Today, 04:18 PM
|
||
Started by nandhumca, Today, 03:41 PM
|
0 responses
8 views
0 likes
|
Last Post
by nandhumca
Today, 03:41 PM
|
Comment