Your question is unclear. Have you tried anything? How do you identify the price trend? What are your buy/sell signals? Do you have any specific issues with your code?
Please enable the necessary setting in your browser, otherwise you will not be able to log in.