Multi timeframe with stocks creating error

Forums ProRealTime English forum ProBuilder support Multi timeframe with stocks creating error

Viewing 3 posts - 1 through 3 (of 3 total)
  • #183115

    Hi

    I have code for indicator that is generally running well with FX, indices etc, it runs well with stocks but comes up with reasonably frequent calculation errors when switching between stocks. It will add the indicator to a stock without issue but not when switching between, and doesnt do it with all the chart timeframes either, but seemes indiscrimiate in what it produces the error on.

    1: it doesnt do it with FX, indices etc just stocks.

    So I’ve contemplated that maybe its related to the closure of the item, so I created a snippet of code to only run the calculation if the daily is open and not to run if closed, so it only calculates when the next daily is open again. This doesn’t change the indicator in any way.

    In relation to the calculation (its a calculation error that comes up) it doesnt come up with any errors when using the “Timeframe (default)” only. So its related to the multi timeframe coding.

    There don’t seem to be any issues in the coding, no 0 divisions that should come up… and if they did you would expect them to be repeated when re-adding the indicator, which it doesnt.

    So I’m in the process of giving it some thought, but its not a complicated calculation, just involves highs and lows ..

     

    Is there any instance of this happening before?

    I’ll continue to ponder on it, not too much of anissue as using the default overcomes anything or a simply reload…  Is there something about stocks i should know about in relation to basic calculations?

    #183116

    I’ve never experienced such kind of errors.

    You should post the code to for us to be able to investigate it.

     

     

    #183123

    Cheers

    I’ve been spending a little time contemplating the functions required for the indicator and associated code, and surmised there must be a coding conflict somewhere, so I did have an outcome left to the platforms default behaviour, so I’ve replaced that by coding it properly to calculate it, didnt appear an issue in anything but stocks and commodities, but there you go.. gotta do what you gotta do… it was a bit of a mind-bender to think how to do it, but needs must!..

    I’ve managed to come up with a code that appears pretty smooth running on stocks and commodities and all other charts, so hopefully its just a case of disseminating these changes throughout the rest of the called indicators… Just wondering if removing the “only calc if open on daily” causes an issue, but it doesnt seem to and I’ve got it retained incase… I think my tweaks have resolved it but will see when its disseminated and ran on several charts with different timeframes simultaneously..

    It was around retaining a level while certain parameters were met, which i did by using one of the relevant counted parameters using it as a count for the number of candles before the current level to retain the level..

     

    Amended for each section but it appears to solve the issue when a level is coded in….Will see when its fully coded…

Viewing 3 posts - 1 through 3 (of 3 total)

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