I am trying to implement a simple strategy from a book. I figured this would help me learn the QC framework. Here are the rules:

88564_1698453435.jpg

Ignore rule #7. I ran the backtest but there was no buying or selling. Can anyone help point out what I am doing wrong in how I am using the API.