Can someone please show me how to place a trade to Buy/Sell using Forex instrument With 

- buy if  

  - the price is the highest price for the past 3hrs (or for simplicity, on the same day)  &

  - 1 minute candlestick had started above 20 minute-EMA and finished below 20 minute-EMA &

  - the next 1 minute candlestick also started above 20 minute-EMA and finished below 20 minute-EMA 

- sell if

 - when the loss is 10 pips  or

 - the profit becomes 25 pips

 

I can do only easy part as below: 

   def Initialize(self):
        self.SetStartDate(2020, 1, 1)    #Set Start Date
        self.SetEndDate(2021, 1, 31)      #Set End Date
        self.SetCash(10000)             #Set Strategy Cash
        
        pairs = ["EURUSD", "GBPUSD", "AUDUSD", "NZDUSD","EURGBP"]
        
        self.forexPair = "EURUSD"
        self.AddForex(self.forexPair, Resolution.Minute, Market.Oanda)

I would really appreciate it because It has been one of the items on my bucket list in the past 14 years.