Plot 7 consecutive bars as histogram?

S

ShinJ

New member
Can you help me to add a line to code, that will signal 7 consecutive closes on one side of the histogram and mark this 7th bar on chart?

Thank you

Code:
declare lower;
Input price = close;
Input Fast = 1;
Input Slow = 5;
def FastSMA = Average(Price, Fast);
def SlowSMA = Average(price, Slow);
plot ZeroLine = 0;
plot Diff = FastSMA - SlowSMA;
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
 
Last edited:
BenTen

BenTen

Administrative
Staff
VIP
Can you be more specific about your request? Seven red or green consecutive closes? What does it have to do with the moving average code you posted?
 
S

ShinJ

New member
This code plots closes above or below 5 SMA, so I need somehow indicate 7 consecutive closes on both sides of moving average on histogram and also would be nice to indicate 7th candle itself on the chart
 

Similar threads

Top