I'm trying to build a Strategy where a position will SAR when a prior high or low are taken out. For example if I am Short and the security crosses above the High from x periods ago then I want to Long.
In this example I am using a simple RSI with 35 and 65 the signal levels. In the Strategy Wizard I am inputting 10 as the 'bars ago' parameter yet the code seems to be ignored when I view it:
Here is my code:
// Condition set 1
if (CrossAbove(RSI(14, 3).Avg, 35, 1))
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (CrossBelow(Close, Low, 1))
{
EnterShort(DefaultQuantity, "");
}
// Condition set 3
if (CrossBelow(RSI(14, 3).Avg, 65, 1))
{
EnterShort(DefaultQuantity, "");
}
// Condition set 4
if (CrossAbove(Close, High, 1))
{
EnterLong(DefaultQuantity, "");
Please advise,

Comment