Hello, sometimes the strategy gives me this error message and it disconnects, I don't know how to solve it so that it doesn't happen
the error is; Strategy 'Bot1': Error on calling 'OnBarUpdate' method on bar 3142: The calling thread cannot access this object because a different thread owns it.
One conclusion is that when drawing elements with a fixed name, you can then remove them with "removedrawnobject", but this should not be a problem since it only draws that object when a series of variables are given and if they are not given, "else" eliminates them he removes.
This strategy should look back at most 120 bars, but nevertheless it calculates further and gives me this error.
I would like to know if there is any way to avoid it, thanks as always for the help

Comment