Previous Candle Crosses EMA Scanner

T

tryingtotrade

New member
Hi I am looking for help coding a scanner. There are 2 conditions. One is having the last low be above the 20EMA. This was easy and is already in TOS MovingAverage_Scan. The other condition is having an offset where the low of the candle before the last was below the 20EMA.
I got this code (below) from the condition wizard but keep getting the error where the secondary period not allowed: 1 min.
low("period" = AggregationPeriod.MIN, "priceType" = PriceType.LAST) from 1 bars ago is less than MovAvgExponential("length" = 20)."AvgExp"

Is there an easier way to do this. Really just looking for when for then the candle two previous crosses the 20 EMA.
 
T

tomsk

Well-known member
VIP
The scanner does not accept secondary aggregations so rethink your logic
 
T

tryingtotrade

New member
thanks. found it may be easier to just use the PriceAverageCrossover instead
 

Similar threads

Top