Alpha-Decreasing Exponential Moving Average ( ADEMA) from Tradingview

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #220383 quote
    Al
    Participant
    Senior

    Hello ,

    I am requesting a code translation from Pine script of Tradingview to Prorealtime langage .

    Here is the code

    //@version=4
    // Copyright (c) 2019-present, Alex Orekhov (everget)
    // Alpha-Decreasing Exponential Moving Average script may be freely distributed under the terms of the GPL-3.0 license.
    study(“Alpha-Decreasing Exponential Moving Average”, shorttitle=”ADEMA”, overlay=true)
    alpha = 2 / (int(bar_index) + 1)
    ema = close
    ema := alpha * ema + (1 – alpha) * nz(ema[1], ema)
    plot(ema, title=”ADEMA”, linewidth=2, color=color.orange)
    Thanks in advance
    #220406 quote
    Nicolas
    Keymaster
    Master

    Here is the translated code to be used with ProRealTime for the ADEMA

    ema = close
    if barindex>1 then 
    alpha = 2 / (barindex + 1)
    ema = alpha * ema + (1 - alpha) * ema[1]
    endif 
    
    return ema
    Al thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Alpha-Decreasing Exponential Moving Average ( ADEMA) from Tradingview


ProBuilder support

New Reply
Author
author-avatar
Al @aloziop Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
2 years, 4 months ago.

Topic Details
Forum: ProBuilder support
Language: English
Started: 09/05/2023
Status: Active
Attachments: 2 files
Logo Logo
Loading...