# litepresence # june 21 2015 # Green Dragon Begins Today PAIR = pairs.btc_usd def tick(): ma2 = data[PAIR].ma(2) ma30 = data[PAIR].ma(30) ma60 = data[PAIR].ma(60) ma90 = data[PAIR].ma(90) ma150 = data[PAIR].ma(150) ma30i = data[PAIR][-1].ma(30) ma60i = data[PAIR][-1].ma(60) ma90i = data[PAIR][-1].ma(90) ma150i = data[PAIR][-1].ma(150) # GREEN DRAGON CURRENT STATE 6/21/2015 green_dragon = 0 if ((ma30 > ma60) and # True (ma60 > ma90) and # False, but converging (ma90 > ma150) and # True (ma2 > ma30) and # True (ma30 > ma30i) and # True (ma60 > ma60i) and # True (ma90 > ma90i)): # True green_dragon = 1 plot('green_dragon', green_dragon, secondary=True) plot('green_dragon', 0, secondary=True) plot('o', 0, secondary=True) if info.tick == 0: plot('z', -20, secondary=True)