Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple Indicator Generates Errors.

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

    Simple Indicator Generates Errors.

    I have been all over the Freeze documentation for Brushes. I need to do a couple simple things and its extremely frustrating. I have an simple indicator that colors bars based on High and low logic. The color of the bars is defined by the UserProperties Dialog. The second thing is that I would like to change the Opacity of the bar colors but I cannot even get close to that because of the errors in the first steps.

    1) I know I can't use the Predefined Brushes because You cannot change their attributes. So first I defined a New SolidcolorBrush. That seemed to work but it quickly blew out as it seems to keep adding new brushes each time OnbarUpdate is called to process the code the logic and quickly reaches the max and errors out.

    2) So referring to the documentation I added a CustomBrush to the User Dialog knowing that I should be able to alter the brush Opacity and this way won't have to keep generating Brushes. I Frooze the brush at each point But Now it still Blows out on New brushes but generates DirectX erros telling me the chart Rendering failed as well. Since I only generate the new brush once in the userDialog as per the documentation I do not understand this.

    This Should not be this difficult but it has been dogging me for weeks. Attached is the Simple Code. Put two data Series on a chart with the shorter one candleStick and the Longer one a Box. Overlay them in the same panel. Put one copy of the indicator on each and load in Playback and by the time it Syncs up with the selected date you should replicate my problem.

    One thing to add. It doesn't just generate Errors. It corrupts settings. Such as the Symbol it is applied to. It wiped the CL 01 -16 - 49 out and replace it with just close which generated its own error.

    Thanks to anyone who can help.
    Jerry
    Attached Files
    Last edited by JerryWar; 11-29-2016, 07:36 PM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by Aviram Y, Today, 05:29 AM
0 responses
2 views
0 likes
Last Post Aviram Y  
Started by quantismo, 04-17-2024, 05:13 PM
3 responses
25 views
0 likes
Last Post NinjaTrader_Gaby  
Started by ScottWalsh, 04-16-2024, 04:29 PM
7 responses
34 views
0 likes
Last Post NinjaTrader_Gaby  
Started by cls71, Today, 04:45 AM
0 responses
6 views
0 likes
Last Post cls71
by cls71
 
Started by mjairg, 07-20-2023, 11:57 PM
3 responses
217 views
1 like
Last Post PaulMohn  
Working...
X