Entering Long Position at next bar open when ChikouSpan (today close back shift 26 days) cross above the SenkouSpanA and SenkouSpanB (26 days ago);
Close Long Position when ChikouSpan cross below SenkouSpanA and SenkouSpanB.
Below is my strategy code:
{
// Condition set 1
if (CrossAbove(IchiLines(9, 26, 52).ChikouSpan, IchiCloud(9, 26, 52).SenkouSpanA[26], 1)
&& CrossAbove(IchiLines(9, 26, 52).ChikouSpan, IchiCloud(9, 26, 52).SenkouSpanB[26], 1))
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (CrossBelow(IchiLines(9, 26, 52).ChikouSpan, IchiCloud(9, 26, 52).SenkouSpanA[26], 1)
&& CrossBelow(IchiLines(9, 26, 52).ChikouSpan, IchiCloud(9, 26, 52).SenkouSpanB[26], 1))
{
ExitLong("", "");
}
}
But it shows no positions taken in backtesting. Any idea how to solve it?
Comment