heloi would like a cloud for this

Piper2808t

Member
2019 Donor
VIP
i would like a line above the previous day hi and a line below the previous day low with a cloud in between in x cents between the lines pic should explain thanks


#High-Low-Open-Close truetrader.net
#
input aggregationPeriod = AggregationPeriod.MONTH;
input length = 1;
input displace = -1;
plot PrevDayOpen = Highest(open(period = aggregationPeriod)[-displace], length);

PrevDayOpen.SetDefaultColor(GetColor(9));
PrevDayOpen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayHigh = Highest(high(period =
aggregationPeriod)[-displace], length);

PrevDayHigh.SetDefaultColor(GetColor(3));
PrevDayHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayLow = Lowest(low(period =
aggregationPeriod)[-displace], length);

PrevDayLow.SetDefaultColor(GetColor(3));
PrevDayLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayClose = Highest(close(period = aggregationPeriod)[-displace], length);

PrevDayClose.SetDefaultColor(GetColor(2));
PrevDayClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
 
Solution
i would like a line above the previous day hi and a line below the previous day low with a cloud in between in x cents between the lines pic should explain thanks


#High-Low-Open-Close truetrader.net
#
input aggregationPeriod = AggregationPeriod.MONTH;
input length = 1;
input displace = -1;
plot PrevDayOpen = Highest(open(period = aggregationPeriod)[-displace], length);

PrevDayOpen.SetDefaultColor(GetColor(9));
PrevDayOpen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayHigh = Highest(high(period =
aggregationPeriod)[-displace], length);

PrevDayHigh.SetDefaultColor(GetColor(3));
PrevDayHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayLow = Lowest(low(period =...
i would like a line above the previous day hi and a line below the previous day low with a cloud in between in x cents between the lines pic should explain thanks


#High-Low-Open-Close truetrader.net
#
input aggregationPeriod = AggregationPeriod.MONTH;
input length = 1;
input displace = -1;
plot PrevDayOpen = Highest(open(period = aggregationPeriod)[-displace], length);

PrevDayOpen.SetDefaultColor(GetColor(9));
PrevDayOpen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayHigh = Highest(high(period =
aggregationPeriod)[-displace], length);

PrevDayHigh.SetDefaultColor(GetColor(3));
PrevDayHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayLow = Lowest(low(period =
aggregationPeriod)[-displace], length);

PrevDayLow.SetDefaultColor(GetColor(3));
PrevDayLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayClose = Highest(close(period = aggregationPeriod)[-displace], length);

PrevDayClose.SetDefaultColor(GetColor(2));
PrevDayClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

You can adjust the x cents at the input screen

Screenshot-2022-10-24-051336.png
Ruby:
#High-Low-Open-Close truetrader.net
#
input aggregationPeriod = AggregationPeriod.MONTH;
input length = 1;
input displace = -1;
plot PrevDayOpen = Highest(open(period = aggregationPeriod)[-displace], length);

PrevDayOpen.SetDefaultColor(GetColor(9));
PrevDayOpen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayHigh = Highest(high(period =
aggregationPeriod)[-displace], length);

PrevDayHigh.SetDefaultColor(GetColor(3));
PrevDayHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayLow = Lowest(low(period =
aggregationPeriod)[-displace], length);

PrevDayLow.SetDefaultColor(GetColor(3));
PrevDayLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot PrevDayClose = Highest(close(period = aggregationPeriod)[-displace], length);

PrevDayClose.SetDefaultColor(GetColor(2));
PrevDayClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

input x_cents = .50;
input showclouds = yes;
AddCloud(if showclouds
         then Max(PrevDayHigh, PrevDayHigh[1]) + x_cents
         else Double.NaN,
         Min(PrevDayHigh, PrevDayHigh[1]),
         Color.GREEN, Color.GREEN);


AddCloud(if showclouds
         then Max(PrevDayLow, PrevDayLow[1])
         else Double.NaN,
         Min(PrevDayLow, PrevDayLow[1]) - x_cents,
         Color.RED, Color.RED);
 
Solution

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
416 Online
Create Post

Similar threads

Similar threads

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