Custom Indicator: SMA * LastPrice

Forums ProRealTime English forum ProBuilder support Custom Indicator: SMA * LastPrice

Viewing 6 posts - 1 through 6 (of 6 total)
  • #218686

    Hi All, Is there anyone can help me with the code to create a custom indicator able to return the product between Simple Moving Average (dynamic setting of the period) and the last available price (e.g. close price)?

    #218690
    JS

    Hi @antogargi

     

    Can you tell us a bit more about what you’re looking for?

    What do you mean by the product between an SMA and the closing price?

     

    #218691

    Is this one what you need?

     

    #218699

    Hi @Roberto, thanks a lot

    My request might be incorrect

    Following the attached screenshot:

    1. I’ve created the custom indicator (the orange indicator in the volume graph named “Last price multiplied by its average”, left-hand side)
    2. the expected result should be: 2.008,9 (SMA) * 132,23 (Price) = 265.636,847
    3. the orange indicator returns instead 18.299

    Does the code you’ve shared correspond to the point #2?

    #218701
    JS

    Hi,

     

    The value of the orange indicator is the result of:

    Average[20](Close) * Close = 18.299

     

    You want to calculate:

    Average[20](Volume) * Close = 265,636,847

     

    So, for the orange indicator you should use “Volume” for the calculation of the average and not the “Close”…

    #218702

    Hi @Js, it works, great 🙂

    Thanks a lot!

    Antonio

    1 user thanked author for this post.
    avatar JS
Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login