self.AddForex("EURUSD", Resolution.Daily)

slices = self.History(["EURUSD"], 1000, Resolution.Daily)

price = self.Securities["EURUSD"].Price


if price > x:
self.SetHoldings("EURUSD",5)

elif price < x:
self.Liquidate("EURUSD")

Hello folks, Have a question on how some of these commands work. the set holdings loop checks the criteria for a buy every day right? please correct me if im wrong. I intend the liquidate line to remove any buys,

There is also a problem. After the first 10 or so trades the code starts to execute uneven quantities of buys. I want it to be consistently 5 as i wrote above. Also short trades are showing up in the backtest, which to me makes no sense.