in Search

How to run this formula up to Metastock?

Last post 06-16-2009, 22:50 by Kreangast. 2 replies.
Sort Posts: Previous Next
  •  06-16-2009, 17:48 29923

    How to run this formula up to Metastock?

  • Smoothed Moving Average (SMMA)Smoothed Moving Average (SMMA)
    The first value of this smoothed moving average is calculated as the simple moving average (SMA):

    SUM1 = SUM(CLOSE, N)SMMA1 = SUM1/N
    The second and succeeding moving averages are calculated according to this formula:

    PREVSUM = SMMA(i-1) *NSMMA(i) = (PREVSUM-SMMA(i-1)+CLOSE(i))/N
    Where:
    SUM1 — is the total sum of closing prices for N periods;
    PREVSUM — is the smoothed sum of the previous bar;
    SMMA1 — is the smoothed moving average of the first bar;
    SMMA(i) — is the smoothed moving average of the current bar (except for the first one);
    CLOSE(i) — is the current closing price;
    N — is the smoothing period.

  • Mov(CLOSE,3,E);Mov(CLOSE,5,E);Mov(CLOSE,8,E);Mov(CLOSE,10,E);
    Mov(CLOSE,12,E);Mov(CLOSE,15,E);(Mov(CLOSE,30,E);Mov(CLOSE,35,E);
    Mov(CLOSE,40,E);Mov(CLOSE,45,E);Mov(CLOSE,50,E);Mov(CLOSE,60,E);

  • SMMA formula into.

  • Thanks

  • Kreangast

  •  06-16-2009, 19:20 29924 in reply to 29923

    Re: How to run this formula up to Metastock?

    Kreangast,

    The purpose of the Forum is not to write your codes for you.  The forum is designed to assist you to fix mistakes when you write your code or get stuck overcoming a limitation of the coding language or end up results that are far from what you expected.  When requesting coding assistance, to get a prompt reply you should post your best attempt at achieving the goal.  When it can be seen that you have put in some effort yourself, then, one of the Fourm members will give you their time to help you.  "Give a man a fish.... teach a man to fish..."  Use the MS Users Manual and the free Equis Formula Primer to guide you along.

    There are a lot of people here who are willing to assist you to write your code, but if you want other people to do all the work for you, then please seek the services of a contract programmer.



    wabbit Big Smile [:D]


    "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."
    Edsgar W. Dijkstra

     

    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status :
    My SkyPE account : wabbit.com.au

  •  06-16-2009, 22:50 29926 in reply to 29924

    Re: How to run this formula up to Metastock?

    Hi wabbit

    Thank you, answer busy !

    Friends here to help me write this code, I am grateful to you.

    Kreangast

    09-6-17

     

     

View as RSS news feed in XML