Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Threading issue

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

  • ETFVoyageur
    replied
    Originally posted by koganam View Post
    Freeze() the brush after you create it.
    Thank you. That seems to have solved the problem.

    --EV

    Leave a comment:


  • koganam
    replied
    Originally posted by ETFVoyageur View Post
    I get an exception.
    The exception comes from the following line of code. darkBullColor and darkBearColor are both of type System.Windows.Media.SolidColorBrush.
    Code:
    if (isUpTrend) PlotBrushes[rIndicatorPlot.index][0] = darkBullColor; else PlotBrushes[0][0] = darkBearColor;
    What am I doing wrong?

    --EV

    P.S. I think it is irrelevant, but rIndicatorPlot.index = 0, and PlotBrushes has 2 entries.
    Freeze() the brush after you create it.

    Leave a comment:


  • ETFVoyageur
    started a topic Threading issue

    Threading issue

    I get an exception.
    An exception of type 'System.InvalidOperationException' occurred in WindowsBase.dll but was not handled in user code

    Additional information: The calling thread cannot access this object because a different thread owns it.
    The exception comes from the following line of code. darkBullColor and darkBearColor are both of type System.Windows.Media.SolidColorBrush.
    Code:
    if (isUpTrend) PlotBrushes[rIndicatorPlot.index][0] = darkBullColor; else PlotBrushes[0][0] = darkBearColor;
    What am I doing wrong?

    --EV

    P.S. I think it is irrelevant, but rIndicatorPlot.index = 0, and PlotBrushes has 2 entries.
    Last edited by ETFVoyageur; 08-18-2015, 03:55 AM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by ezrollin, Yesterday, 08:51 PM
1 response
30 views
0 likes
Last Post bltdavid  
Started by Rubix, Yesterday, 09:31 PM
0 responses
17 views
0 likes
Last Post Rubix
by Rubix
 
Started by ark321, Yesterday, 05:12 PM
1 response
25 views
0 likes
Last Post NinjaTrader_EricB  
Started by futurenow, Yesterday, 09:08 PM
0 responses
4 views
0 likes
Last Post futurenow  
Started by fafafdenis, Yesterday, 04:56 PM
1 response
6 views
0 likes
Last Post NinjaTrader_EricB  
Working...
X