Yes, this is what I want (either a market order or limit order I think), my exact question is how usually this is implemented or code up, do I just do following:
if price>xxxx or price<xxxx then sell at market order
Is there going to be any problem if doing this way?