TenkanSen = ICHIMOKUCLOUD().TenkanSen;
KijunSen = ICHIMOKUCLOUD().KijunSen;
Cu = MAX(TenkanSen, KijunSen);
Cl = MIN(TenkanSen, KijunSen);
ClosePrice = CLOSE();
BullishSignal = ClosePrice > Cu;
BearishSignal = ClosePrice < Cl;
IF(BullishSignal, 1, IF(BearishSignal, -1, 0));
SHOWBAR(BullishSignal, Green, Bar, AboveHigh);
SHOWBAR(BearishSignal, Red, Bar, BelowLow);
I used the AI to check the script. AI says that the script looks good, but it also warns that it is still learning scripting and can be wrong. Anyway, I used this script as a signal test, on the SP500 and I set the test period from 07/20/1998 to 04/30/2004 (my in sample data)
Unfortunately, no results were shown because the of the “invalid script”
Did I make a mistake in the defining the script? Scripting is like a new language to me, and I am learning it slowly with the help of the AI in knowledge base