Repaints My Simplified Scalping Setup For ThinkOrSwim

Repaints
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
);
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
734 Online
Create Post

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top