I currently messing around with NinjaScript to get used to it and there a simple question popped up:
I would like to program a very simple strategy.
I have a SMA with the length of 10 and I would like to buy when the value of the SMA on the current bar falls below the value of the SMA of the previous bar. I have tried to code this with CrossBelow(), which of course did not work since CrossBelow needs a series as an argument. My next try was slope, but I got kind of stuck there. Can somebody please provide a simple code snippet here?
Thank you very much in advance!

Comment