Any chance anyone out there would be kind enough to post the code for this. It's just a simple if then statement. I don't understand the syntax of
Multicharts.net and there are limited tutorials (none on how to integrate existing studies with paintbars)
I have
exhausted my research, and it's not worth $70 I was quoted to have someone copy paste a sequence.
Thanks so much.
This was my code from
Thinkorswim:
input length = 13;
input paintBars = yes;
def EMA = ExpAverage(close, length);
def MACD = ExpAverage(close, 12) - ExpAverage(close, 26);
def MACDHist = MACD - ExpAverage(MACD, 9);
def GreenPrice = EMA > EMA[1] and MACDHist > MACDHist[1];
def RedPrice = EMA < EMA[1] and MACDHist < MACDHist[1];
plot
Bullish = GreenPrice;
plot Neutral = !GreenPrice and !RedPrice;
plot
Bearish = RedPrice;
Bullish.SetDefaultColor(Color.
UPTICK);
Bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
Bullish.SetLineWeight(3);
Bullish.hide();
Neutral.SetDefaultColor(Color.BLUE);
Neutral.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
Neutral.SetLineWeight(3);
Neutral.hide();
Bearish.SetDefaultColor(Color.
DOWNTICK);
Bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
Bearish.SetLineWeight(3);
Bearish.hide();
DefineGlobalColor("Bullish", Color.UPTICK);
DefineGlobalColor("Neutral", Color.BLUE);
DefineGlobalColor("Bearish", Color.DOWNTICK);
AssignPriceColor(if !paintBars then Color.CURRENT else if GreenPrice then globalColor("Bullish") else if RedPrice then globalColor("Bearish") else globalColor("Neutral"));