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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
568 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
548 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
548 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment