Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

timezonecolor from NinjaTrader_Jesse

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    Click image for larger version

Name:	2020-02-26 22_53_26-Control Center - Log.jpg
Views:	244
Size:	63.6 KB
ID:	1088611

    #2
    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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sjsj2732, Yesterday, 04:31 AM
    0 responses
    31 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    286 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    283 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    133 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    91 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X