Hi Guys, 

Alex you gave me some code on Friday, that correctly performed a buy on open and sell on close.

I want to modify it so that, it buys on open, and puts a stop below yesterday's low. And will exit for a loss if stop hit, if stop not hit will exit on close as normal.

The code should be easy just I've spent a couple of hours on it and not getting anywhere. The error I'm getting is ordertype is not recognised, yet it comes up in the complier autotype feature. 

I tried to find documentation examples but can't find, 

1) What am I doing wrong?!

2) I've added a couple of other lines, e.g. self.rWindow.Add(data["SPY"]) in OnData, so I can access yesterday's low.  Is this the correct place to put it?

Kind Regards Alex