How do you Optimise ATR Stops Around Price

Forums ProRealTime English forum ProOrder support How do you Optimise ATR Stops Around Price

  • This topic has 51 replies, 4 voices, and was last updated 6 years ago by avatarBard.

Tagged: ,

Viewing 15 posts - 1 through 15 (of 52 total)
  • #78385

    I posted this: https://www.prorealcode.com/topic/how-do-you-optimise-bands-based-on-price/#post-77380

    a month ago and would still like to know how this achieved using the PRT platform.

    Cheers in advance.

    #78396

    Was 2 weeks ago. Please don’t double post! You can “up” your topic if you think people are not answering as fast as you want.

    #78410

    Sorry! Wrong link above. The request was actually posted a month ago: https://www.prorealcode.com/topic/optimisation-of-atr-dev-stops/

    How do I “up” my own post?

    (Have a few tech issues using Safari here on PRC – hence comment about not seeing the post when I first posted as it wasn’t in my Topics list and so I reposted it later that day.
    I won’t double post again… Frankly I have no idea how you keep up with the myriad of single posts/comment threads here but appreciate that you do)

    #78453

    Ok, so that is a triple posts! First time for me! 😆

    To “up” your topic (being freshness), just reply to it.

    When posting a new topic, be sure to have sufficient words in your title (at least 2 words).

    I replied yesterday to the second one, link in the first post of this topic! (so confusing…).

    1 user thanked author for this post.
    #78489

    “First time for me!” You and me!
    My original post disappeared, so I thought better makes sure… then it reappeared later on a new log in.. ooops.
    Then I reposted the same question 2 wks later.. ooops.

    Should I hand myself in to ‘Forum Etiquette’ jail?

    Thank you for the optimisation tip @nicolas.
    I was trying to do it from the Variable Optimisation spanner and also didn’t have the indicator code in the strategy.

    Now, when I add my (Stop and Reverse) Kase Dev Stop code posted here:
    to the System code (Kase Peak Oscillator entry and Dev Stop exit) I am still not sure how to proceed?

    A lot of the indicator code needed to be removed with: “//” as “it’s not found” when I click on the backtest button.

    If I try and “optimise” the Dev Stop 3.6 by adding the line with something like: p3=optimiseddevstop

    I’m getting the same profit result when I know that using Dev 1.0 or Dev 2.2 makes a difference in the profit when running backtests.

    Why do I get the feeling I’m going to be saying “D’oh!” when you explain what I’m doing wrong?

    #78491

     

    #78492

    To optimise variables in a strategy REM them out by typing // in front of them where their value is set and then click the spanner shown in my image and then enter the variable name and assign the start and finish quantities and steps you want to optimize over. Add multiple variables to do several at the same time – up to a limit.

    Screenshot_7-2

    1 user thanked author for this post.
    #78504

    Thanks @Vonassi I didnt know about the REM strikeouts.
    However I get the same profit result of 15.427k (please see screenshot) which is wrong because I’ve seen different profits results by using different Dev Stops. i.e. I’ve individually tested which Dev Stop to use to produce the most profit for this system by manually moving the Dev Stop by changing Dev 2.2 (standard deviations) to Dev 3.6, by moving “indicator 6” code over to the right from:

    to:

    Yet these screens show 15.427k profit for ALL the Dev Stops ranging from 1.0 to 6.0?
    (I did try using “//” for all the Dev Stops for P1 to P5 – it just produces the same 15.427k profit figure).

    Cheers
    Bard

    #78507

    I’ve not been following the thread closely enough to understand all the ins and outs of it but if you see all the same results in your optimization then it is usually the fact that the different value has no effect on the result or you have the optimized variable still fixed at a value somewhere in the code.

    1 user thanked author for this post.
    #78508

    Then it must be this: “you have the optimized variable still fixed at a value somewhere in the code” although I’m not sure where?
    The Dev Stops are basically just like an ATR band being used as a Stop, so it’s like asking: how far away is the optimal distance from price so I know where to put my ATR band to maximise returns.

    #78588

    “you have the optimized variable still fixed at a value somewhere in the code” although I’m not sure where?

    Use Find (right click within the coding window) to search for the variable name … sounds like you have used the same name twice??

    1 user thanked author for this post.
    #78609

    I can see another reference for the p1, p2 etc starting from line 87. Is that what is causing this Dev Stop not to be able to be optimised? Yet it is supposed to be possible?

    Here is the full code a few posts further up this page @GraHal

    https://www.prorealcode.com/topic/how-do-you-optimise-atr-stops-around-price/#post-78491

    Cheers

    #78616

    Your ProOrder program don’t have sufficient information to know what to optimize. All the indicators declared at lines 5,13,21,29 don’t have settings. These indicators must have their settings set as external ones and not in their codes to be CALLed and optimized with ProBacktest.

    For example, the settings for the “Kase Dev Stop Lisse +SAR+4.5/6” indicator should be REM or // like Vonasi said:

    and these settings added as external variables like explained in this video:

    2 users thanked author for this post.
    #78657

    Cheers @nicolas, right, that makes sense why it wouldn’t work using “//” on all the variables as per Vonasi’s tip.

    Now that I have an improved indicator with adjustable settings (as per the video above) and an optimised parameter set in the auto system (made in steps of 0.2 because 0.1 is too much to calculate/optimise), I get this warning when running an optimised backtest, please see screenshot ?

    Ideally I’d want to just use one variable “devstopoptimised” or “p1” (with values ranging from 1 to 7) to test the whole range of values, from dev stop 1.0 (standard deviations) all the way up to dev stop 7.5 which is the widest stop used by Cynthia Kase… but that would alter the whole way that the Stop and Reverse SAR works in this indicator.

    #78660

    That’s normal since your CALL function is no longer valid. Now, if you want to call your indicator, you must embed the variables when you declare it:

    See CALL instruction in the documentation: https://www.prorealcode.com/documentation/call/

Viewing 15 posts - 1 through 15 (of 52 total)

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