need help to translate a simple indior
Page 1 of 733 123 LastLast
Results 1 to 10 of 323

Thread: need help to translate a simple indior

  1. #1
    Hello, I have a simple indior I left in easylanguage and I would love to interpret it into mt4. The easylanguage resembles that:

    vars: mmoment(0);

    mmoment=maxlist(pos(momentum(h,2)),pos(momentum(l, 2)),
    pos(momentum(l,6)),pos(momentum(l,5)),
    pos(momentum(l,3)),pos(momentum(h,6)),
    pos(momentum(h,5)),pos(momentum(h,3)));
    if mmomentlt;percentile(0.05,mmoment,100) subsequently plot1(l,xxx)


    it plots a sign when all those momentums are in the lowest 5% of the momentums in a 100 period.
    Can anybody help me with this?

  2. #2
    So I can't help you this way I really don't know language that is simple.

    I do understand the english language fairly well.

    Maybe it is possible to describe what you will need the indior to do in plain english and people here will help out.

    regards,
    Zen

  3. #3
    Thank you for the reply

    the logic is that:

    1. We calculate the momentum work for the parameters:

    high , lenght 2
    high - lenght 3
    high - lenght 4
    high - lenght 5
    high - lenght 6

    non - lenght 2
    non - lenght 3
    non - lenght 4
    non - lenght 5
    non - lenght 6

    2. We transform all of the amounts in positive ones (I do not understand what the function is called in english) ex: if is -7 we make him 7

    3. We find the greatest number. This will function as A result.

    4. We arrange A ascending's last 100 worth.

    5. If the most recent A is at the 5% of our list we verify. (if is reduced then the 95 percent of the rest of values of A) -that is the percentile function.

    6. In the event the answer to 5 is yes , then we place a dot on the chart. Or an arrow :d


    this indior provides as signals for regions of congestion
    I hope this is clearer

  4. #4

  5. #5
    What do you want to call this indior?

  6. #6
    You mean what name to have the indior? Don't matter really

    I'll name after you in the event that you want

  7. #7
    I am not sure whether that is exactly what you're looking for. It takes a while to load cos of the amt of calculations it needs to run. But it'll stabilise and won't be so intensive onces it finish it's initial run.

    regards,
    Zen

  8. #8
    Quote Originally Posted by ;
    I am not positive if this is what you're looking for. It takes some time to load cos of the amt of calculations it ought to run. But it'll stabilise and won't be so resource intensive onces it complete it's first run.

    regards,
    Zen
    thank you a lot. I provide you a feed back and will try it. (I know that it must be lot of calculations)

  9. #9
    Some thing is wrong. I tried to know the code to corect it but can't.

    I will attempt to explain shortly: first we calculate the HIGHEST of those momentums. Then we would like to see if our indior is in the LOWEST 5% of precedent values.

  10. #10
    Perhaps this will help:
    ================================================== ================================================== ====
    Easy Language - yeah really
    ================================================== ================================================== ====
    Momentum (Function)
    The Momentum study is an overbought/oversold oscillator. It is calculated by subtracting the value returned from the parameter PRICE for the current bar from the value returned from the parameter PRICE for its bar that happened. If the value for the current bar surpasses that of the bar in the past, the value of the function is positive. If the value for the current bar is less than that of the bar in the past, the value of the function is negative. The values returned from the MOMENTUM function oscillates above and below.
    Function
    Momentum(PRICE,LENGTH)
    Parameters
    PRICE specifies a few price of the asset of interest
    LENGTH the amount of monitoring bars to consider
    Returns
    A numeric value containing Momentum for the current bar.
    Usage
    If the market has decreased by greater than x factors, the market is considered to be oversold. If the market has increased by greater than x factors, the market is considered to be overbought.
    If you were to hard code the parameter PRICE with Close, and the parameter LENGTH with 10, then the purpose would subtract the Close of 10 bars ago in the Close of the current bar.
    ================================================== ================================================== ====
    Pos (Reserved Word)
    (num) is a numeric expression.
    Returns the absolute value of num.
    Examples
    Pos(-5) returns 5.
    Pos(350) returns 350.
    ================================================== ===============================
    MaxList (Reserved Word)
    Returns the highest value of the given inputs.
    (Num1) is a numeric expression representing a value to be used in the calculation.
    (Num2) is a second numeric expression representing a value to be used in the calculation.
    (Num3) is a third party numeric expression representing a value to be used in the calculation, etc..
    Examples
    MaxList(45, 72, 86, 125, 47) returns a value of 125.
    MaxList(18, 67, 98, 24, 65, 19) returns a value of 98.
    ================================================== ==========================
    Percentile (Function)
    Calculates the Percentile (k-th value) of a specified period.
    Function
    Percentile(PCNTILE,PRICE,LENGTH)
    Parameters
    PCNTILE a numeric expression that reflects a chosen percentile value between 1 and 0 (.25 = %)
    PRICE specifies that price information to be contemplated
    LENGTH indies the length of time (in bars) to be contemplated
    Returns
    A numeric value comprising the quadrant (k-th value) of a specified period, as defined by Price and Length.
    Usage
    The percentile is the price value, such that PCNTILE percent of these observations are less than the PCNTILE value.
    Example
    Assigns into Value1 the value of the 25th percentile, based on the Closing prices of their last 10 bars:
    Value1 = Percentile(.25,Close,10);
    Assigns into Value2 the value of the 50th percentile, based on the Range of the last 21 bars:
    Value2 = Percentile(.5,Range,21);
    ================================================== ==========================

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.