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.
 

generic

Active member
@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
 

Similar threads

Top