# Does Anybody Know of A Predictive Moving Average Script?

#### YungTraderFromMontana

##### Well-known member
Hey everyone I know its been a while since I've been on the forum, I've been focusing on trading and risk management.

I'm curious if anyone has a moving average script or any script that plots to the right of the current bar, or predicts future price based on the slope of the ma previously, etc. I want to see the logic behind the script because I am making a fractal energy like script that I think should be an improvement or at least an alternate adaptation that uses a different formula but attempts to accomplish a similar thing.

@YungTraderFromMontana Here's a script from Mobius using close values. It moves a lot during RTH so I don't like it but if you make any improvements please let me know.

Code:
``````# Exponent of close

# Mobius
# V01
# Plots the Probable Move using closing value exponent
# Example of use - On a Daily chart it will project probable changes in trend. Expansion area must be at least the length of the "n" value.

input n = 10;

def x = barNumber();
def x0 = if isNaN(close[-1]) and !isNaN(close) then x else x0[1];
def c = if isNaN(close)
then c[1]
else close;

plot price = if x >= highestAll(x0)
then c
else double.nan;

price.SetDefaultColor(Color.Cyan);

plot exp = fold i = 0 to n
with s
do s + getValue(c / (c[2] / c[1]), i) / n;

exp.SetDefaultColor(Color.Cyan);

AddCloud(exp, price, color.red, color.green);

# End Code``````

you can also uses TOS's build in OFFSET feature.

### Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
388 Online

## 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.