MAC- MACH

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #180067 quote
    BF___BF___
    Participant
    Junior

    Ciao , ho visto che Ehlers ha pubblicato sulla rivista TASC il nuovo indicatore MACH, indicatore MAC migliorato.
    qualcuno sa codificarlo per metterlo su Pro Real Time? sto facendo una tesi di laurea su questi nuovi indicatori e non so come codificarli su ProBuilder.

    lascio qua sotto i due codici scritti in EASYLANGUAGE:

    {
    MADH (Moving Average Difference – Hann) Indicator
    (C) 2021 John F. Ehlers }
    Inputs: ShortLength(8), DominantCycle(27);
    Vars: LongLength(20), Filt1(0),
    Filt2(0),
    coef(0), count(0), MADH(0);
    LongLength = IntPortion(ShortLength + DominantCycle / 2);
    Filt1 = 0; coef = 0;
    For count = 1 to ShortLength Begin
    Filt1 = Filt1 + (1 – Cosine(360*count / (ShortLength +
    1)))*Close[count – 1];
    coef = coef + (1 – Cosine(360*count / (ShortLength + 1)));
    End;
    If coef 0 Then Filt1 = Filt1 / coef;
    Filt2 = 0;
    coef = 0;
    For count = 1 to LongLength Begin
    Filt2 = Filt2 + (1 – Cosine(360*count / (LongLength + 1)))*Close[count – 1];
    coef = coef + (1 – Cosine(360*count / (LongLength + 1))); End;
    If coef 0 Then Filt2 = Filt2 / coef;
    //Computed as percentage of price
    If Filt2 0 Then MADH = 100*(Filt1 – Filt2) / Filt2;
    Plot1(MADH, “”, yellow, 4, 4); Plot2(0, “”, white, 1, 1);

    THE MAD (MOVING AVERAGE DIFFERENCE) INDICATOR
    { MAD (Moving Average Difference) Indicator } (C) 2021 John F. Ehlers
    Inputs: ShortLength(8), LongLength(23);
    Vars: MAD(0);
    MAD = 100*(Average(Close, ShortLength) – Average(Close, LongLength)) / Average(Close, LongLength);
    Plot1(MAD, “”, red, 4, 4); Plot2(0,””, white, 1, 1);

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

MAC- MACH


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
BF___ @bf___ Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/21/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...