Sounds wrong coding, anyone can help pls

Forums ProRealTime English forum ProOrder support Sounds wrong coding, anyone can help pls

  • This topic has 8 replies, 5 voices, and was last updated 21 hours ago by avatarJS.
Viewing 9 posts - 1 through 9 (of 9 total)
  • #244086

     

    #244093

    I don’t see errors. The system buys when the DEMA (orange) crosses over ATX (blue).

    #244095

    When I use the strategy this what I get, Pls see attached

    #244100

    Try putting / embedding the called Indicator in with the code of the rest of Strategy.

    Also, isn’t Line 35 (see below) of the ‘Adaptive Ind’ wrong / ‘suspect’ as STR is not defined anywhere, but STR is used in the rest of the  ‘Adaptive Ind’?   This might be causing ProOrder to Reject the overall code?

    sTR = (sTR[1] – sTR[1]) / adxLen + tr

    #244101

    Here is the Indicator if anybody has any ideas about fixing Line 35??

     

    #244109
    JS

    Nicolas, Can you explain the numerator logic – e.g. Line 35 is (sTR[1] – sTR[1]) which would appear to be either null or zero.

    • avatar
      Nicolas • 06/29/2018 #You are right, this is useless. Since I converted it from another programming language, I assume it was in the original code…

    #244114

    Thanks JS, but please could not you (anybody) rejig the code so that the subsequent use of sTR in the Strategy is removed / replaced with something meaningful?
    Examples are Line 40 & 41 –

    DIP = sDMPos / sTR * 100
    DIN = sDMNeg / sTR * 100

    I recall ages ago working up a decent backtest performance with the ‘Adaptive Indicator’, but the Algo got Rejected every time it ran due to ‘not enough historical data’ (yes, I did use Defparam PreLoadbars = 10000.

    The error messages we see are not always ‘true to the words’ and I am thinking that this useless bit of code (STR) was causing my Rejection and also the problems now experienced by the OP / efahmy

     

    #244115

    Assuming that’s the source code:

    https://www.tradingview.com/script/8TQl2WyE-Adaptive-ATR-ADX-Trend-V2-Strategy/

    Then for line 35 mentionned by GraHal, I would keep it and go instead with brackets modified like this (equivalent to “no brackets”, but just for the sake of better visibility…):

     

    Same thing by the way for lines 37 and 38, which could be modified as follows:

     

    To be tested to see if it helps…
    1 user thanked author for this post.
    #244127
    JS

    I think the code should be adjusted like this:

     

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

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