Please note that it will work on multi time frame strategy.
// Exit Long
if (Position.MarketPosition == MarketPosition.Long)
if (CrossBelow(ROC(12), 0, 1))
{
ExitLong("ExitLROC", "Long");
}
// Re-entry Long ROC above 0
if (Position.MarketPosition == MarketPosition.Flat)
if ((BarsSinceExit(0,"ExitLROC",0) > 1 && BarsSinceExit(0,"ExitLROC",0) < 10 ) && CrossAbove(ROC(12), 0, 1))
{
EnterLong(100000, "ReLong");
}
//Exit ReLong
if (Position.MarketPosition == MarketPosition.Long)
if (CrossBelow(ROC(12), 0, 1))
{
ExitLong("ExitLROC2", "ReLong");
}
First "ExitLROC" do OK. But never re-entries, although ROC do crosses above cero again. Am I using BarsSinceExit function OK?
Comment