SO - I'm not sure WHAT/WHY, but i can see there's a difference between our EMA8 lines. I tried putting my code into your plot and it didnt work.
But also - i'm not sure which EMA8 is more true!
input price = close;
input length = 8;
input highLowLength = 10;
def multiplier1 = 2 / (length + 1);
def multiplier2 = AbsValue((close - Lowest(low, highLowLength)) - (Highest(high, highLowLength) - close)) / (Highest(high, highLowLength) - Lowest(low, highLowLength));
def alpha = multiplier1 * (1 + multiplier2);
def ma = CompoundValue(1, ma[1] + alpha * (price - ma[1]), Average(price, length));
plot AEMA = ma;
AEMA.SetDefaultColor(GetColor(1));
is my code.
It seems to be a little quicker, but i dont know that it means its better. It's just what I've been using. any input on THAT?
Also, I'm not sure what they're called - but the data boxes that live up in the top left corner of charts. Could that be used to display a simple "yes / no" as well?
THANK YOU!
There are several ways to accomplish what you need and because I have nothing better to do while I wait for my brownies to finish baking,
I wrote up some samples for you:
Code:
plot ema8 = ExpAverage(close, 8);
plot vwma26 = Sum(volume * close, 26) / Sum(volume, 26);
plot MAcrossUP = ema8 crosses above vwma26 ;
plot MAcrossDN = ema8 crosses below vwma26 ;
#this will make your EMA line change color whenever it is above your volume
ema8.assignValueColor(if ema8 > vwma26 then color.blue else color.magenta);
ema8.setlineWeight(2);
#this will give you an arrow whenever your EMA crosses above your volume
MAcrossUP.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
MAcrossUP.SetLineWeight(2);
MAcrossUP.SetDefaultColor(color.blue) ;
#this will give you an arrow whenever your EMA crosses below your volume
MAcrossDN.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_down);
MAcrossDN.SetLineWeight(2);
MAcrossDN.SetDefaultColor(color.magenta) ;
#this will give you a cloud of colors: green when above, pink when below
AddCloud(ema8, vwma26, color.green, color.pink);
HTH
day one. LOVE the cloud. that is definately a great help. The arrows get lost a little in the lines / candle sticks. working on the right color scheme for those. I didn't set the colors well for the color change. (im also slightly color blind, which is part of my need for visual help with this.! small colors just become a blur for me!)
Either way - this is such a help. Can I turn this into a WL category too? Say, white if over 26 and black if under?