a) by program (indicator)
b) with a DateTime and not a barsAgo parameter in the constructor call
c) in state DataLoaded
Description:
After a draw object is drawn on the indicator by program remove the lock property and move the draw object. When done for the first time by mouse the draw object disappears on the left side of the chartpanel, while you keep the mouse pressed and move it to the right, the draw object appears again from the left panel border and moves with the mouse and offset now.
After the first move the object behaves normally and there is no isssue on draw objects that were created by user on the indicator directly.
Cause:
After debugging it seems to me that this is an anchor problem.
The anchor is created in the Draw class of the draw object(DateTime variant constructor). Later in the OnMouseMove method the anchor x coordinate is ruined after the Anchor.MoveAnchor method was called for the first time.
The only difference between anchors created as described and the rest seems to be that the odd ones have - the first time - property value DrawnOnBar "-1" - and afterwards like user created anchors - "-2147483648". Maybe this helps you locating the problem.
See the example screencast in the attached archive.
Cheers,
patapata
Comment