Lapeer, MI/USA
Experience: Advanced
Platform: ThinkorSwim
Trading: Emini ES, SPY Options
Posts: 1 since Sep 2016
Thanks Given: 1
Thanks Received: 0
|
This should work. If today's 20day is greater than today's 200day and yesterday's 20day is less than yesterday's 200day:
def fast = 20;
def slow = 200;
def FastSMA = MovingAverage(AverageType.Simple, close, fast);
def SlowSMA = MovingAverage(AverageType.Simple, close, slow);
plot BullMA = (FastSMA > SlowSMA) and (FastSMA[1] < SlowSMA[1]);
|