Help on converting : Bias indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #139618 quote
    BITE1437
    Participant
    Average

    May I seek your assistance in converting the following tradingview code to proreal code?

     

    study(“Basic BIAS”, shorttitle = “BIAS”)

    n = input(title=”Basic guides line”, type=input.integer, defval=120)

    //Basic guides can be replaced with other guides
    basic_line = ema(close,n)
    bias = (close – basic_line) / basic_line * 100

    plot(bias,color=#1589F5,style = plot.style_stepline, transp=0)
    hline(0,title = “Zero”, color=#0F001A)

     

     

    Thanks indeed.

    #139662 quote
    Nicolas
    Keymaster
    Master

    It is the normalized distance of the current price related to an EMA, here is the Prorealtime code:

    n=120 //period
    
    basic_line = average[n,1](close)
    bias = (close – basic_line) / basic_line * 100
    
    return bias
    #139690 quote
    BITE1437
    Participant
    Average

    Thanks Nicolas. Always helpful.

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

Help on converting : Bias indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
BITE1437 @bite1437 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by BITE1437
5 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/19/2020
Status: Active
Attachments: No files
Logo Logo
Loading...