Cycle Plots on Specific Days

Mike

Member
I'd like to plot dots above or below expected cycle highs and lows....(as opposed to drawing vertical lines via coding or drawing tools).

Using code snippets from Scott Schulz's Moon Phase post dated 02/05/12 find my coding attempt below:

declare once_per_bar;
declare upper;

# Inputs
input date = YYYYMMDD;
def signal = date;
def Show_Marker = yes;
def Signal_Position = 0.5;

#distance from bar where signal is plotted
input Plot_close_on_lower = No;

def BarHeight = Power(Double.E, Average(Log(Max(high - low, TickSize())), 5));
def SignalLoc1 = BarHeight * Signal_Position;

plot Price = if Plot_close_on_lower then close else Double.NaN;
Price.SetStyle(Curve.POINTS);
Price.SetLineWeight(3);
Price.SetDefaultColor(Color.DARK_ORANGE);

#plot date;
Price.SetStyle(Curve.POINTS);
Price.SetLineWeight(3);
Price.SetDefaultColor(Color.DARK_ORANGE);

Any help would be greatly appreciated....
 
I'd like to plot dots above or below expected cycle highs and lows....(as opposed to drawing vertical lines via coding or drawing tools).

Using code snippets from Scott Schulz's Moon Phase post dated 02/05/12 find my coding attempt below:

declare once_per_bar;
declare upper;

# Inputs
input date = YYYYMMDD;
def signal = date;
def Show_Marker = yes;
def Signal_Position = 0.5;

#distance from bar where signal is plotted
input Plot_close_on_lower = No;

def BarHeight = Power(Double.E, Average(Log(Max(high - low, TickSize())), 5));
def SignalLoc1 = BarHeight * Signal_Position;

plot Price = if Plot_close_on_lower then close else Double.NaN;
Price.SetStyle(Curve.POINTS);
Price.SetLineWeight(3);
Price.SetDefaultColor(Color.DARK_ORANGE);

#plot date;
Price.SetStyle(Curve.POINTS);
Price.SetLineWeight(3);
Price.SetDefaultColor(Color.DARK_ORANGE);

Any help would be greatly appreciated....

when asking strangers for Help, provide as much info as possible, like a link.
assume no one will know what you're talking about, because they probably won't.
i don't know what it is or what you want it to do.
I don't know what a cycle is, so it would be good if you described it.

If you click on the number of a post, the page reloads with the updated link. Copy that and clicking that will take you right to that post.

Is this what you were talking about??
https://usethinkscript.com/threads/phase-moon-indicator-for-thinkorswim.962/#post-7853
 

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

when asking strangers for Help, provide as much info as possible, like a link.
assume no one will know what you're talking about, because they probably won't.
i don't know what it is or what you want it to do.
I don't know what a cycle is, so it would be good if you described it.

If you click on the number of a post, the page reloads with the updated link. Copy that and clicking that will take you right to that post.

Is this what you were talking about??
https://usethinkscript.com/threads/phase-moon-indicator-for-thinkorswim.962/#post-7853

Yes...post 7853 is the one that I obtained the snippets of code from. The cycles that I study can vary, e.g. a 20, 40, 80 Day Cycle etc. Example: Adding dots above or below a bar low or a bar high at a specific date...

 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
421 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