ExponentialAverage – Map to Bloomberg

Forums ProRealTime English forum ProBuilder support ExponentialAverage – Map to Bloomberg

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

    Hi all,

    I am trying to get my exponential moving average to return figures that map to those given by Bloomberg (with price tolerance, of course). I have the units set to 5 minutes (testing against DAX), and am running (for example) ExponentialAverage[100](Close). However, the results I am getting are different enough to be causing issues.

    One thought I had was that the PRT averages run for the last n units regardless of time, whereas I believe Bbg only run for values when the markets are open. I don’t know if there is a way around this.

    Another thought is simply that the underlying calculation is different, although that would surprise me.

    Has anyone had experience with this, or is able to give me some guidance?

    Many thanks,

    Richard

    #100951

    This is it ?

    #100953

    PRT averages run for the last n units regardless of time, whereas I believe Bbg only run for values when the markets are open.

    This is most likely your issue. Due to the lack of arrays in PRT coding the only way to get the same result would be to store the last 100 values in 100 different variables while the market is open and then store the latest value and shift all the previous variable values and forgetting the first one.

    Something like (except that this is just for an average with a lookback of 4 and just a simple average:

    Your question is more of an indicator question than a platform question so I have moved it to the ProBuilder forum.

     

    #101049

    Thanks – as someone from a programming background I do find the PRT language exasperatingly limited at times. It took me quite a while to realise that it didn’t allow text variables, which is just downright odd!

    Do you know what the code would be for an exponential moving average, as calculated by Bloomberg or by PRT?

    Also, would it work to limit the market times in the general template settings, as that seems to limit the values shown in the charts, which is presumably what the indicators are based on? I have tried to check, but I am having (unrelated) issues getting the detailed results window up for my probacktest…

    #101050

    Many features are missing, arrays, text, integer & date data types,

    Unfortunately they are not easy to support and it’s not likely we are gonna have them before long!

    You may try using these averages, setting their time range https://www.prorealcode.com/prorealtime-indicators/time-range-moving-averages-simple-exponential-weighted-trsma-trema-trwma/

    It could be a workaround.

    1 user thanked author for this post.
    #101052

    Thanks – looks like it could be an answer. Not terribly efficient, but hopefully not enough to impact.

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