I've noticed that plotshapes don't appear on chart when the buy/sell occurs on a CS that has opened and closed at the same price. However the backtest shows that a buy or sell order has taken place on that day. The image below shows an example
Here is the line of code regarding the plotting of my shapes
One of the first things I try to do when attempting to work out an issue, is throw all the data into an exploration. That way I can see the status of all the variables that I am working with.
In you code segment, you are actually doing assignments to variables like ypostion and offset and xshift. This may be a carry over of your coding from languages that support named variables, but in AFL it is actually an assignment. While it should not cause an issue, I would recommend just putting the values in the PlotShape call.