Ema of an Ema

Ghost

Member
Platform
  1. Thinkorswim
Not sure if this was thought of but I am a big ema guy and this was something I made by accident. Simply the ema of an ema, and I logged it to make it easier to compare in the past, you can easily delete that out if you want.

Code:
#EmaOfEma
#Ghost
declare lower;

def price =close;
input length = 8;

def emaf = expaverage(price,length);
plot data = Log(emaf);

    def ema144  = expaverage(data, 138);
    def sumema  =   ema144  ;
    plot fibavg = sumema ;

    def ema145  = expaverage(data, 155);
    def sumema1  =   ema145  ;
    plot fibavg1 = sumema1 ;

    def ema146  = expaverage(data, 38);
    def sumema2  =   ema146  ;
    plot fibavg2 = sumema2 ;

    def ema147  = expaverage(data, 55);
    def sumema12  =   ema147  ;
    plot fibavg12 = sumema12 ;



addcloud(fibavg,fibavg1, color.cyan,color.cyan);
fibavg1.setdefaultColor(color.cyan);
fibavg.setdefaultColor(color.cyan);

addcloud(fibavg2,fibavg12, color.green,color.green);
fibavg12.setdefaultColor(color.green);
fibavg2.setdefaultColor(color.green);
 

barbaros

Administrator
Staff member
Looking at the code, you probably don’t need to define sumema variables. They seem to be redundant. And possible to give buy/sell signals when all of them are stacked in a specific direction.
 

Ghost

Member
Looking at the code, you probably don’t need to define sumema variables. They seem to be redundant. And possible to give buy/sell signals when all of them are stacked in a specific direction.
Yes, good eye, forgot to remove it, thanks. Also, that’s something I’ve been looking into, it’s more accurate given its adequately smoothened, may be delayed a bit but seems to be effective, sill running some tests.
 
Top