Attached is a results chart for the above code. You can see that the Dot11High series is plotted with the red line but attempts to have a limit entry at that red line fails, as does the IF condition, resulting in an entry at every Close. This is all within the algo function. Are you saying that I need to create the series in the run() function?

If you get some understanding of the problem from the attached chart, great. Otherwise I will keep trying to understand the variables tomorrow.

Attached Files
Untitled.png (9 downloads)