I want add a condition :RSI >70 to my strategy.My logic is that,if the RSI is greater than 70,short will be triggered.
I tried this way:
if (State == State.DataLoaded)
{
AddChartIndicator(RSI(14, 1));
}
private void SetEntrySignal()
{
if (CrossAbove(RSI(14, 1), 30, 1))
{
_enterShort = Close[0] < Open[0];
_enterShort &= Open[0] < Low[1];
}
}
I also tried this:
private void SetEntrySignal()
{
if (RSI(14, 1) > 70)
{ _enterShort = Close[0] < Open[0];
_enterShort &= Open[0] < Low[1];
}
}
But this still now work.Can you show me the correct way directly,I have read the document already ,but have no idea how to solve.Thank you so much!
Comment