I assume that you know how to get Previous Candles Low and you don't know how to get the highest price from a group of trades. Try this: http://prntscr.com/920jx5
I wanted to find out if anyone knows how to receive a Market Order entry price and then make sure that any future Pending Order is only placed if the Pending Order entry price is above or below the highest or lowest Market Order.