View attachment 19115
Please provide a clearer explanation of your indicator. Relatively new to options trading, just not fully comprehending its function. Familiar with Fib. Just not seeing how this is "easier". I see the different "price points" within the levels. Not sure why you have them as as percentages to the tens of thousands %???? To have to decipher the % and convert it into price in a split second when you're in the middle of trading?? Thank you in advance for your help....
Sorry for the later response. Work has been overwhelming as of late.
Let's explain how the Moving Average Divergence indicator works and how you can use it in your trading analysis.
How the Moving Average Divergence Indicator Works:The Moving Average Divergence indicator is designed to identify bullish and bearish divergences between the price and a simple moving average (SMA). It calculates the SMA based on the selected input (e.g., closing price) and a specified length (e.g., 20 periods). Then, it compares the price with the SMA to detect divergences.
A bullish divergence occurs when the price makes a lower low, but the SMA makes a higher low. This suggests potential upward momentum in the price. Conversely, a bearish divergence occurs when the price makes a higher high, but the SMA makes a lower high, indicating potential downward momentum.
The indicator plots dashed lines (green for bullish divergence and red for bearish divergence) on the chart to highlight the occurrences of divergences. Additionally, it also plots the SMA and Fibonacci levels for reference.
How to Use the Moving Average Divergence Indicator:Here's how you can use the Moving Average Divergence indicator in your trading analysis:
- Identify Divergence Signals: Look for instances where the green (bullish) or red (bearish) dashed lines appear on the chart. These lines represent potential bullish or bearish divergence signals, respectively. When you see these lines, it suggests a potential change in the price direction.
- Confirm with Price Action: Always combine the divergence signals with other forms of technical analysis and price action. Look for additional confirmation signals such as trendline breaks, candlestick patterns, or support/resistance levels.
- Use Fibonacci Levels as Reference: The indicator plots Fibonacci levels based on the difference between the price and the SMA. These levels can act as support and resistance zones. Consider using these levels as potential price targets or areas to watch for price reactions.
- Set Stop Loss and Take Profit: When using the Moving Average Divergence indicator as part of your trading strategy, set appropriate stop-loss and take-profit levels. Managing risk is essential in trading, and stop-loss orders can help protect your capital from large losses.
- Backtest and Optimize: Before using the indicator in live trading, conduct backtesting using historical data to assess its performance and identify optimal settings. You can tweak the length of the SMA or the divergence threshold to suit your trading style and the specific market you're trading.
Remember that no indicator can guarantee accurate predictions in the market, and it's essential to use the Moving Average Divergence indicator in conjunction with other technical and fundamental analysis tools.
If you want it to display price not percentage then use this script:
#Moving Average Divergence 1.2a modified by Trader4TOS 07/31/23 ( added threshold feature and percentage changed to price display. divergenceThreshold parameter is likely to filter out minor divergences and focus on significant ones. Divergences that fall below the specified threshold value would be considered less relevant and might not trigger the indicator's signals.
For example, if the divergenceThreshold is set to 0.001, any divergence with a difference between the custom price and the SMA of less than 0.001 would not be considered significant enough to trigger a divergence signal (neither bullish nor bearish). Only divergences with a difference greater than or equal to the threshold would be considered valid.
However, in the provided script, the divergenceThreshold parameter is not used in any conditional statement to filter out divergences. As a result, all divergences, regardless of their magnitude, would be treated equally, and the indicator would plot divergence lines for all occurrences.)
Ruby:
input length = 20;
input divergenceThreshold = 0.001;
input lineSize = 5; # Size of the divergence lines
def customPrice = close; # Replace 'close' with your desired price input
def sma = Average(customPrice, length);
def bullishDivergence = customPrice[1] < customPrice and sma[1] > sma and AbsValue(customPrice[1] - sma[1]) >= divergenceThreshold;
def bearishDivergence = customPrice[1] > customPrice and sma[1] < sma and AbsValue(customPrice[1] - sma[1]) >= divergenceThreshold;
def divergence = if bullishDivergence then 1 else if bearishDivergence then -1 else Double.NaN;
plot BullishLine = if divergence == 1 then low else Double.NaN;
BullishLine.SetDefaultColor(Color.DARK_GREEN);
BullishLine.SetStyle(Curve.SHORT_DASH);
BullishLine.SetLineWeight(lineSize);
plot BearishLine = if divergence == -1 then high else Double.NaN;
BearishLine.SetDefaultColor(Color.DARK_RED);
BearishLine.SetStyle(Curve.SHORT_DASH);
BearishLine.SetLineWeight(lineSize);
# Plotting the Moving Average for reference
plot MovingAvg = sma;
MovingAvg.SetDefaultColor(Color.GRAY);
# Fibonacci Levels
def fibLevel0 = customPrice;
def fibLevel1 = customPrice + (customPrice - sma) * 0.382;
def fibLevel2 = customPrice + (customPrice - sma) * 0.618;
def fibLevel3 = customPrice + (customPrice - sma) * 1.0;
def fibLevel4 = customPrice + (customPrice - sma) * 1.618;
# Labels for Fibonacci Levels
AddLabel(yes, "Fib Level 0: " + Round(fibLevel0, 2), Color.GRAY);
AddLabel(yes, "Fib Level 1: " + Round(fibLevel1, 2), Color.GRAY);
AddLabel(yes, "Fib Level 2: " + Round(fibLevel2, 2), Color.GRAY);
AddLabel(yes, "Fib Level 3: " + Round(fibLevel3, 2), Color.GRAY);
AddLabel(yes, "Fib Level 4: " + Round(fibLevel4, 2), Color.GRAY);
# Hiding Labels
BullishLine.HideBubble();
BearishLine.HideBubble();
MovingAvg.HideBubble();