Objects events kicking off scripts

 

You mean something like draw a trend line, and when that trend line is passed then open order?