hi , everyone . how can i make a bot which works on according to this  logic

  1. when it will buy any crypto coin it should check if the previous low of a candle and the current price of candle is same ( 1min interval bar)  
  2. bot should buy as soon as the second candle hits the same low price as of first low
  3. bot should sell when the price hits the previous high 
  4. if the price drops after buying , then the coin should be sold after  new candle's high and should be bought when the price is low as before.


thank you for reading , hope u get my msg and what i want to do😊