Is it possible to use Zero Lag Exponential in the code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9236 quote
    janneta
    Participant
    New

    Hi Guys,

    Is it possible to use Zero Lag Exponential Bollinger in the code ?
    As far I see I can’t use Zero Lag Exponential Bollinger Up or down bands even they are displayed live on chart together with price. Is it possible to use it somehow in the code ?

    Thanks for any help,
    Janneta

    #9244 quote
    Nicolas
    Keymaster
    Master

    Hi janneta,

    Yes it would be possible, but it needs to recode a complete bollinger bands indicator made of Zerolag EMA for that.

    Here is the code I just wrote for this:

    // parameters
    // period = 20
    // dev = 2.0
    
    lag = ROUND((period-1)/2)
    data = (close + (close-close[lag]))
    
    ZLEMA = exponentialaverage[period](data)
    BolUp = ZLEMA+STD[period]*dev
    BolDn = ZLEMA-STD[period]*dev
    
    RETURN ZLEMA as "ZeroLag EMA", BolUp as "Bollinger Up ZLEMA", BolDn as "Bollinger Down ZLEMA"

    Please find attached the file and a screenshot.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Is it possible to use Zero Lag Exponential in the code


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
janneta @janneta Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/11/2016
Status: Active
Attachments: No files
Logo Logo
Loading...