I asked ChatGPT to create this MA cloud snippet that can be pasted at the end of TOP indicator #2
Code:
# =====================================
# INDEPENDENT MA CLOUD SYSTEM
# =====================================
input show_9_18_cloud = yes;
input show_18_34_cloud = no;
input show_34_89_cloud = no;
input show_9_34_cloud = no;
input show_9_89_cloud = no;
input show_18_89_cloud = no;
# =====================================
# 9 / 18 CLOUD
# =====================================
def bull_9_18 = ma9 > ma18;
AddCloud(
if show_9_18_cloud and bull_9_18 then ma9 else Double.NaN,
if show_9_18_cloud and bull_9_18 then ma18 else Double.NaN,
Color.GREEN,
Color.DARK_GREEN
);
AddCloud(
if show_9_18_cloud and !bull_9_18 then ma18 else Double.NaN,
if show_9_18_cloud and !bull_9_18 then ma9 else Double.NaN,
Color.RED,
Color.DARK_RED
);
# =====================================
# 18 / 34 CLOUD
# =====================================
def bull_18_34 = ma18 > ma34;
AddCloud(
if show_18_34_cloud and bull_18_34 then ma18 else Double.NaN,
if show_18_34_cloud and bull_18_34 then ma34 else Double.NaN,
Color.CYAN,
Color.BLUE
);
AddCloud(
if show_18_34_cloud and !bull_18_34 then ma34 else Double.NaN,
if show_18_34_cloud and !bull_18_34 then ma18 else Double.NaN,
Color.MAGENTA,
Color.VIOLET
);
# =====================================
# 34 / 89 CLOUD
# =====================================
def bull_34_89 = ma34 > ma89;
AddCloud(
if show_34_89_cloud and bull_34_89 then ma34 else Double.NaN,
if show_34_89_cloud and bull_34_89 then ma89 else Double.NaN,
Color.YELLOW,
Color.ORANGE
);
AddCloud(
if show_34_89_cloud and !bull_34_89 then ma89 else Double.NaN,
if show_34_89_cloud and !bull_34_89 then ma34 else Double.NaN,
Color.ORANGE,
Color.RED
);
# =====================================
# 9 / 34 CLOUD
# =====================================
def bull_9_34 = ma9 > ma34;
AddCloud(
if show_9_34_cloud and bull_9_34 then ma9 else Double.NaN,
if show_9_34_cloud and bull_9_34 then ma34 else Double.NaN,
Color.PINK,
Color.RED
);
AddCloud(
if show_9_34_cloud and !bull_9_34 then ma34 else Double.NaN,
if show_9_34_cloud and !bull_9_34 then ma9 else Double.NaN,
Color.RED,
Color.DARK_RED
);
# =====================================
# 9 / 89 CLOUD
# =====================================
def bull_9_89 = ma9 > ma89;
AddCloud(
if show_9_89_cloud and bull_9_89 then ma9 else Double.NaN,
if show_9_89_cloud and bull_9_89 then ma89 else Double.NaN,
Color.GRAY,
Color.GRAY
);
AddCloud(
if show_9_89_cloud and !bull_9_89 then ma89 else Double.NaN,
if show_9_89_cloud and !bull_9_89 then ma9 else Double.NaN,
Color.DARK_GRAY,
Color.BLACK
);
# =====================================
# 18 / 89 CLOUD
# =====================================
def bull_18_89 = ma18 > ma89;
AddCloud(
if show_18_89_cloud and bull_18_89 then ma18 else Double.NaN,
if show_18_89_cloud and bull_18_89 then ma89 else Double.NaN,
Color.BLUE,
Color.BLUE
);
AddCloud(
if show_18_89_cloud and !bull_18_89 then ma89 else Double.NaN,
if show_18_89_cloud and !bull_18_89 then ma18 else Double.NaN,
Color.RED,
Color.BLACK
);