Announcement
Collapse
No announcement yet.
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.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by sjsj2732, Yesterday, 04:31 AM
|
0 responses
31 views
0 likes
|
Last Post
by sjsj2732
Yesterday, 04:31 AM
|
||
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
286 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
283 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
133 views
1 like
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
91 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|

Comment