I'm coding a strategy and one of the conditions I want to be met is that I have a kind of Swing High before shorting or a kind of Swing Low before buying.
For example, two red bars required before placing the trade to short, or two green bars required before placing the trade to buy.
What is the code I should use for this?
Any help would be greatly appreciated!
Kind regards,
Stephen
Comment