I want to create a strategy based on the Swing Highs and Lows, but I only want it to respect those swing highs/lows if they are older than 100 bars on the 1 minute chart.
I came up with this code so far but getting stuck as its not giving the results I was hoping for.
// Go Short
if ((CrossAbove(High, Swing1.SwingHigh, 5))
&& (VOL1[0] > 150)
&& (High[1] > High[0])
&& ((CurrentBar - Swing1.SwingHighBar(1,1,100)) > 100))
{
BackBrushAll = Brushes.CornflowerBlue;
EnterShort(Convert.ToInt32(DefaultQuantity), "");
}

Comment