Hi,
@samer800 @MerryDay
I need some help in plotting fib levels using this indicator. I took some parts of the indicator out.
There are three lines in the indicator: MidRange, High ATR and Low ATR.
I would like fib level to be automatically plotted from following levels.
I would like Fib levels (o % to 100%) to be plotted (lines) from Mid range to High ATR.
I would like fib levels ( 0% to 100%) to be plotted (lines) from Mid range to low ATR .
Also, if small bubbles can be plotted on fib levels as well as options of fib extension to be plotted.
Thank you!! I appreciate all the help that I can get.
Here is the indicator:
# Expected Market Move
# Daily and intraday
# Assembled by Chewie 1/2/2022
input labels = yes;
input length = 14;
input em_skew_percent = 70;
input em_bandwidth = 100;
input aggregationPeriod_nd = AggregationPeriod.WEEK;
def averageType = AverageType.WILDERS;
def hi_nd = high(period = aggregationPeriod_nd)[1];
def lo_nd = low(period = aggregationPeriod_nd)[1];
def cl_nd = close(period = aggregationPeriod_nd)[1];
def open_nd = open(period = aggregationPeriod_nd);
def ivGapHi;
def expmove;
ivGapHi = imp_volatility(period = aggregationPeriod_nd)[1];
expmove = close[1] * ivGapHi * Sqrt(6) / Sqrt(365) * em_skew_percent / 100 * em_bandwidth / 100;
# Start Volatility Range B
def ATR_nd = MovingAverage(averageType, TrueRange(hi_nd, cl_nd, lo_nd), length);
def op_nd = open_nd;
plot ATRHI = (op_nd + ATR_nd);
plot ATRLO = (op_nd - ATR_nd);
plot weeklyMID = (ATRHI - ATRLO) / 2 + ATRLO;
weeklyMID.AssignValueColor(Color.YELLOW);
weeklyMID.SetLineWeight(2);
AddLabel(yes and labels and close > weeklyMID, "WK", color.green);
AddLabel(yes and labels and close < weeklyMID, "WK", color.red);
# Customizations
ATRHI.AssignValueColor(Color.DARK_RED);
ATRHI.SetLineWeight(4);
#t2_percentile.AssignValueColor(color.light_red);
ATRLO.AssignValueColor(Color.DARK_GREEN);
ATRLO.SetLineWeight(4);
#b2_percentile.AssignValueColor(color.light_green);
ATRHI.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
ATRLO.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
@samer800 @MerryDay
I need some help in plotting fib levels using this indicator. I took some parts of the indicator out.
There are three lines in the indicator: MidRange, High ATR and Low ATR.
I would like fib level to be automatically plotted from following levels.
I would like Fib levels (o % to 100%) to be plotted (lines) from Mid range to High ATR.
I would like fib levels ( 0% to 100%) to be plotted (lines) from Mid range to low ATR .
Also, if small bubbles can be plotted on fib levels as well as options of fib extension to be plotted.
Thank you!! I appreciate all the help that I can get.
Here is the indicator:
# Expected Market Move
# Daily and intraday
# Assembled by Chewie 1/2/2022
input labels = yes;
input length = 14;
input em_skew_percent = 70;
input em_bandwidth = 100;
input aggregationPeriod_nd = AggregationPeriod.WEEK;
def averageType = AverageType.WILDERS;
def hi_nd = high(period = aggregationPeriod_nd)[1];
def lo_nd = low(period = aggregationPeriod_nd)[1];
def cl_nd = close(period = aggregationPeriod_nd)[1];
def open_nd = open(period = aggregationPeriod_nd);
def ivGapHi;
def expmove;
ivGapHi = imp_volatility(period = aggregationPeriod_nd)[1];
expmove = close[1] * ivGapHi * Sqrt(6) / Sqrt(365) * em_skew_percent / 100 * em_bandwidth / 100;
# Start Volatility Range B
def ATR_nd = MovingAverage(averageType, TrueRange(hi_nd, cl_nd, lo_nd), length);
def op_nd = open_nd;
plot ATRHI = (op_nd + ATR_nd);
plot ATRLO = (op_nd - ATR_nd);
plot weeklyMID = (ATRHI - ATRLO) / 2 + ATRLO;
weeklyMID.AssignValueColor(Color.YELLOW);
weeklyMID.SetLineWeight(2);
AddLabel(yes and labels and close > weeklyMID, "WK", color.green);
AddLabel(yes and labels and close < weeklyMID, "WK", color.red);
# Customizations
ATRHI.AssignValueColor(Color.DARK_RED);
ATRHI.SetLineWeight(4);
#t2_percentile.AssignValueColor(color.light_red);
ATRLO.AssignValueColor(Color.DARK_GREEN);
ATRLO.SetLineWeight(4);
#b2_percentile.AssignValueColor(color.light_green);
ATRHI.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
ATRLO.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Last edited: