Is it possibile to get a system to optimize itself each x?

Forums ProRealTime English forum ProOrder support Is it possibile to get a system to optimize itself each x?

Viewing 15 posts - 1 through 15 (of 17 total)
  • #5605

    Hi,

    Is it possibile to get a system to optimize a variable itself, for example, each month, and then use the new variable?

    Thanks!

    #5615

    Hello, yes it is possible (never done it before, but got ideas on this..). But it also mainly depends of the strategy itself and how many variables to optimize and the criteria you’d like to be optimize? gain, drawdown%, sharpe ratio, etc.. ?

    Beware that it would involve a lot of work though!

    #5676

    Wow, that would be amazing! 🙂

    I have two systems in mind, one I wrote and one i found here:
    https://sites.google.com/site/prorealtimecodes/my-backtests/ma-cross-optimised
    Acctually a simple MA Cross, works good in backtests on OMX 5 min, probably on DAX as well. (I added stops and target.)

    I would like to use the 3 last past month to optimize “x” and “y”, “pl” and “pp”, and use the variable on the upcoming 4 month. The variable with highest gain.
    So I would like to use januari, februari and march data, to use on upcoming april.
    This optimizing would then happen each month, using 3 last past months.

     

     

    #5677

    I use about min value: 1 max value: 300 and step: 5, when I optimize X and Y.
    The author says: “Shows results of best historical ma crossing for time frame. No guarantee of future success though!”

    I think possibile future success could benefit from optimization each month 🙂

    #6161

    Hi, is this post still work in progress?

    I currently trade similar 5 minute systems and manually optimise the variables each weekend for the upcoming week, looking back over a 4 week period to keep up with current market conditions. Getting the system to optimise itself would be a great help, especially when you need to optimise more than 1 market/system.

    From what Nicolas said, it may be a lot of work, but it would be a really useful timesaver in the long run. You will also be able to play with the period of time looked back for the optimisation and see which period gives the best results over time.

    Many thanks for all your help, this is a great website.

    #6169

    Thank you Robin for your compliment.

    Optimization of what already happened is like rewrite the whole history. It not guarantee at all, that past behaviour of something would be the same in future. “Simple” optimization of parameters alone is not effective, it needs a lot of others confirmation to reduce the possibilities that optimized result are not curve-fitted. Human always needs everything to be the more perfect and that introduce a bias in our manner to build things, like trading strategies, and that’s where we fail.

    Making an auto-optimization module would be quiet interesting for development and coding purpose, but be sure that it would not make anyone a millionaire 🙂

    #6171

    Thank you for your reply and advice Nicolas 🙂

    #6180

    Hi Nicolas,

    From what you have said, my current weekly optimisation based on the previous 4 weeks performance, isn’t a good method in the long run. To try not to overfit, if I keep the moving averages the same, I can get consistent results, I just need to adapt the stop loss and the take profit to achieve higher profits each week. I tried using a percentage of ATR for both the stop and take profit, but on a 5 minute chart there is too much noise for this to be effective, and I can’t use multi timeframes (% of daily ATR) to cut through the noise. Is there anything you suggest to keep up with the changing volatility in the market so I optimise the stop and take profit (also the moving averages?)?

    Trading, for example GBPUSD, using the basic unoptimised test settings below for the averages and a 1:2+ stop and take profit, this system is profitable each month. Recently I thought I should automate it as it’s a very simple, mechanical system. I do add some other indicators when I day trade manually, but want to simplify it so it’s not over fitted to past performance, as you have suggested.

    Do you have any suggestions as to how I can improve this system? In backtesting and live forward auto-trading, I have found optimising to be more successful, but I could have just been lucky. If you can help me find flexible and optimised stop and take profit solutions, I’ll be eternally grateful 🙂

    Thanks for all your help,

    Robin.

    #6192

    Hi Robin, Do you mean for example, an stop loss or target profit changing position when price reach a determinated level?

    If you want breakeven profit every time the markets gives you the chance, should be something like this:

    If you want this stop based only on ATR indicator, can’t help you more ATM.

    Adolfo.

    #6218

    Hi Adolfo,

    Thanks for your post. I’m looking for stop and target systems that evolve with market volatility until entry, and are then fixed for the duration of the trade. I was thinking of something based on ATR, but I’m sure there are other measures of volatility that could be used. Using ATR would be fine, but there is too much noise on a lower timeframe to get something consistently working.

    Cheers,

    Robin.

    #6220

    @Robin

    If you can keep the same moving average values and keep consistent good results, then keep your strategy the same and don’t even try to make it much better with optimization. I’m not a guru, this is what I think, so make your own decision about it 🙂

    What your are pointing about the ATR takeprofit and stoploss is much clever, it is commonly accepted that ATR tp and sl computed on the fly are much efficient because they are adapted to the current market behaviour.

    A % of the daily ATR is possible to calculate on the smaller timeframe. In ProBuilder, it is possible to get the daily OHLC with the instructions : DOPEN, DHIGH, DLOW and DCLOSE.

     

     

    #6226

    Hi Nicolas,

    Thanks for your help. I’ll try using a % of the daily ATR for stop and TP. Just gotta figure out how to write it 🙂

    Robin.

    #6229

    Directly from Wikipedia :

    First, you’ll have the calculate the true range with :

    The true range is the largest of the:

    • Most recent period’s high minus the most recent period’s low
    • Absolute value of the most recent period’s high minus the previous close
    • Absolute value of the most recent period’s low minus the previous close

    Then make an exponential average of the result over n period.

     

    #6230

    Many thanks. I’m new to coding so i’m trying to work out how to represent it in PRT code, lol 🙂

    #6268

    I’m trying to write the Daily True Range as an indicator. I wrote the code below but although it accepts the code without error, nothing appears in the indicator screen.  I’m new to coding so not sure where i’m going wrong:

    I then need to write the code to create the Daily Average True Range indicator so I can call it to my system and use a % of it. Would the code for DATR be as below? I’m not sure how I’d combine the DTR and the Wilder average (or exponential average) to create the DATR.

    DATR=WilderAverage[n](DTR[n](close))

    Many thanks for your help,

    Robin.

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

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