// returns 9 followed by:
// TF daily 4hours 1hour 15min
// Buy condtions 1 1 1 1
// Sell conditions 2 2 2 2
// No condition met 0 0 0 0
//
// For examnple, a returned value of 92001 means than on the Daily TF a SELL condition was met (digit 2), wbhile on the 15min TF a BUY condition
// was met (digit 1). For all other TFs no condition was met.
//
x = 90000 //Start with 90000 not to lose leading 0's
TIMEFRAME(daily)
indicator1 = Average[1](Stochastic[3,1](close)) //Buy
c1 = (indicator1 < 28)
indicator2 = MACDline[12,26,8](close)
c2 = (indicator2 > 0)
indicator1a = Average[1](Stochastic[3,1](close)) //Sell
c1a = (indicator1a CROSSES OVER 78)
indicator2a = MACDline[8,26,9](close)
c2a = (indicator2a < 0)
TIMEFRAME(4 hours)
indicator3 = Average[1](Stochastic[3,1](close)) //Buy
c3 = (indicator3 < 28)
indicator4 = MACDline[12,26,8](close)
c4 = (indicator4 > 0)
indicator3a = Average[1](Stochastic[3,1](close)) //Sell
c3a = (indicator3a CROSSES OVER 78)
indicator4a = MACDline[8,26,9](close)
c4a = (indicator4a < 0)
TIMEFRAME(1 hour)
indicator5 = Average[1](Stochastic[3,1](close)) //Buy
c5 = (indicator5 < 28)
indicator6 = MACDline[12,26,8](close)
c6 = (indicator6 > 0)
indicator5a = Average[1](Stochastic[3,1](close)) //Sell
c5a = (indicator5a CROSSES OVER 78)
indicator6a = MACDline[8,26,9](close)
c6a = (indicator6a < 0)
TIMEFRAME(15 minutes)
indicator7 = Average[1](Stochastic[3,1](close)) //Buy
c7 = (indicator7 < 28)
indicator8 = MACDline[12,26,8](close)
c8 = (indicator8 > 0)
indicator7a = Average[1](Stochastic[3,1](close)) //Sell
c7a = (indicator7a CROSSES OVER 78)
indicator8a = MACDline[8,26,9](close)
c8a = (indicator8a < 0)
TIMEFRAME(default)
IF c1 AND c2 THEN
x = x + 1000 //Dazily BULLish
ELSIF c1a AND c2a THEN
x = x + 2000 //Daily BEARish
ENDIF
IF c3 AND c4 THEN
x = x + 100 //4 Hours BULLish
ELSIF c3a AND c4a THEN
x = x + 200 //4 Hours BEARish
ENDIF
IF c5 AND c6 THEN
x = x + 10 //1 Hour BULLish
ELSIF c5a AND c6a THEN
x = x + 20 //1 Hour BEARish
ENDIF
IF c7 AND c8 THEN
x = x + 1 //15 Minutes BULLish
ELSIF c7a AND c8a THEN
x = x + 2 //15 Minutes BEARish
ENDIF
SCREENER[x] (x AS "TF")