Indicator Overview
Inputs:
EMAs: 200 EMA, 400 EMA, 55 EMA, 89 EMA.
SMMA: 21 SMMA, 9 SMMA.
Cycle Length: Used to determine the high and low boundaries over a specific period.
Custom SMMA Function:
A custom function for calculating the SMMA, which is slightly different from the standard moving average and typically smoother.
Calculations:
EMAs and SMMA: Calculate the respective moving averages based on user inputs.
Cycle High and Low: Determine the highest and lowest prices over the specified cycle length.
Cloud Colors:
The script determines the color of the clouds based on the relative positions of EMAs and SMMA.
Phases:
Accumulation: When the current price is below the cycle low, and there has been no previous crossing above the cycle high.
Distribution: When the current price is above the cycle high, and there has been no previous crossing below the cycle low.
Plotting:
EMAs and SMMA: Plots lines for each of the EMAs and SMMA.
Clouds: Fills the area between relevant EMAs and SMMA with colors to visualize their relationship.
Cycle Boundaries: Plots the cycle high and low levels.
Buy/Sell Signals: Generates buy and sell signals based on crossover and crossunder of the price with cycle boundaries, combined with specific EMA conditions