@Sticks-N-Bones So..... You are looking for something like one of these columns?
# Code for the 1st column def signal = close / MovAvgExponential("length" = 40)."AvgExp" *100 ; AddLabel(yes, " "); AssignBackgroundColor(if signal > 100 then color.green else color.red);
# code for the 2nd column plot signal = close / MovAvgExponential("length" = 40)."AvgExp" *100 ; AssignBackgroundColor(if signal > 100 then color.green else color.red);
# WalkingBallista EMA Lookback Cross # https://usethinkscript.com/d/119-moving-average-crossover-watchlist-column-for-thinkorswim declare lower; input lookback = 5; input ema1_len = 9; input ema2_len = 20; input averageType = AverageType.EXPONENTIAL; def ema1 = MovAvgExponential(length = ema1_len); def ema2 = MovAvgExponential(length = ema2_len); def bull_cross = ema1 crosses above ema2; def bear_cross = ema1 crosses below ema2; def bull_lookback = Highest(bull_cross, lookback); def bear_lookback = Highest(bear_cross, lookback); plot signal = if bull_lookback then 2 else if bear_lookback then 1 else 0; signal.AssignValueColor(if signal == 2 then Color.DARK_GREEN else if signal == 1 then Color.DARK_RED else Color.DARK_ORANGE); AssignBackgroundColor(if signal == 2 then Color.DARK_GREEN else if signal == 1 then Color.DARK_RED else Color.DARK_ORANGE);
Hi @rad14733, that must be it then. Last nite, I was testing it out through the ondemand feature. I am guessing this type of ondemand replay data doesn't go through the proper route, that's why the column did not update for me last night. It works great this morning except the lag. So your explanation make sense.
declare upper; input fastPeriod = 3; input slowPeriod = 10; input signalPeriod = 5; input price = close; def fastEma = ExpAverage(price, fastPeriod); def slowEma = ExpAverage(price, slowPeriod); def _ppo = ((fastEma - slowEma) / slowEma) * 100; def _signal = ExpAverage(_ppo, signalPeriod); plot BUY = Crosses(_ppo, _signal, CrossingDirection.ABOVE); plot SELL = Crosses(_ppo, _signal, CrossingDirection.BELOW); BUY.setpaintingstrategy(paintingstrategy.BOOLEAN_ARROW_UP); SELL.setpaintingstrategy(paintingstrategy.BOOLEAN_ARROW_DOWN); ##End
How would ema8 be greater than ema50 and not greater than ema21...??? But if you need the logic it would be ema8 > ema21 and ema21 > ema50...Hi Ben,
I am not sure if my earlier question was clear
I am using 8,21,and 50 Ema.i want to take trade when 8 ema is above the 21 ema and 21 is above the 50 ema. All these conditions are met then show them in watch list .
Hi Ben, i need to show if they moving avg are showing in a order - 8 , 8 below 21 ,21 below 50. If these three conditions are met show in a watch list with some me color indication. Could you please help me on this?Yes Ben, I am looking for ema8 > ema21 and ema21 > ema50...
|Thread starter||Similar threads||Forum||Replies||Date|
|A||One line moving average crossover||Questions||5|
|Simple moving average crossover scan||Questions||1|
|F||Moving Average Crossover Strategy||Questions||5|
|R||Williams AD Indicator with Moving Average Crossover for ThinkorSwim||Indicators||16|
|Moving Average Crossover RSI Indicator for ThinkorSwim||Custom||40|