I would really appreciate some help on this attached strategy. I've added notes in the code.
We have a simple entry: a green bar.
Then, the idea is that if the last trade is a winner, we wait 5 bars before the next entry is allowed. If the last trade is a loser, we wait 20 bars before the next trade is allowed.
As it is, the strategy doesn't wait and continues to enter on the next green bar regardless of whether the last trade was a winner or a loser.
I think I have a lot of things right in the code, but since I'm a novice, I have something fundamental missing, or in the wrong order, or I need to nest some if's...
Any hints would be greatly appreciated
thanks,
David
Comment