I am trying to put totether a an arrow up to buy which works fine with all my other condition, however what I would like to add is when spy 1 min 8EMA > 21 Spy 1 min EMA then that condition is satisifed which I have defined as 'spybullish'. Every time I try to add the condition I don't get an error but just no signal ever once I add that conditoin, when clearly the SPY 8EMA SPY 21 EMA. Any help I can get here with this? THis below is what I have. Would greatly appreciate.
Input ticker = “SPY”;
input spylength1 = 8;
input spylength2 = 21;
input aggr = AggregationPeriod.min;
def c = close(ticker,period = aggr);
def SPYFast = ExpAverage(c, spylength1);
def SPYSlow = ExpAverage(c, spylength2);
Def spybearish = SPYFast < SPYslow;
Def spybullish = SPYFast >SPYslow;
#then a bunch of other code that works
plot crossUP = if spybullish and ATRTrailready and SlowStochReady and macdready then plotLow else double.NaN ;
Input ticker = “SPY”;
input spylength1 = 8;
input spylength2 = 21;
input aggr = AggregationPeriod.min;
def c = close(ticker,period = aggr);
def SPYFast = ExpAverage(c, spylength1);
def SPYSlow = ExpAverage(c, spylength2);
Def spybearish = SPYFast < SPYslow;
Def spybullish = SPYFast >SPYslow;
#then a bunch of other code that works
plot crossUP = if spybullish and ATRTrailready and SlowStochReady and macdready then plotLow else double.NaN ;