Let's say one uses SetContext to enter a long with a different symbol than the primary one. After the trade RestoreContext reverts to the original symbol. On subsequent bars, when accessing the position object, for example, IsLastPositionActive, do you need to SetContext to the symbol traded in order to find the Position object?
Thanks,
Gene
Size:
Color:
Yes, you need to call SetContext after calling IsLastPositionActive to exit the right stock.
Size:
Color:
Eugene., can you check that? I don't think it's required since passing the Position object to the exit signal should be sufficient.
Size:
Color:
You're right, removing the SetContext call doesn't seem to make a difference. Live and learn.
Size:
Color: