EMA Trigger Code for Watchlists
home | Think or Swim Tutorials | EMA Trigger Code for Watchlists

EMA Trigger Code for Watchlists

Please use the full screen option in the bottom right hand corner of the video for the best viewing experience.

# FibQueen_emaTrigger Watchlist Code # created by Nos16 # swingoptiontrader@gmail.com # last revised Apr-04-2012

def price = close; def fast_length = 8; def slow_length = 34; def displace = 0;

def fastema = ExpAverage(price[-displace], fast_length); def slowema = ExpAverage(price[-displace], slow_length);

plot crossover = if fastema > slowema then 1 else 0; crossover.AssignValueColor(if fastema > slowema then Color.BLUE else color.DARK_RED); AssignBackgroundColor(if fastema > slowema then Color.BLUE else Color.DARK_RED);