High volume of instant failing trades

Forums ProRealTime English forum ProOrder support High volume of instant failing trades

Viewing 8 posts - 1 through 8 (of 8 total)
  • #150723

    Hello All,

    I’m starting to learn how to use ProRealCode to create an automated trading programme and have come across a high volume of trades when backtesting that look to have instantly closed out but I’m at a loss as to why they are occurring. I started off by using the Simplified Creation option and picked my combination of indicators – this has worked to an extent but only less than 50% are successful – the ‘instant kill’ trades are what is throwing me off which I cannot work out what the issue is (programme per below):

    Has anyone ever encountered this before and if so, any ideas as to what is wrong?  thanks in advance!

    #150732

    It’s because your conditions are met every candlestick, so many trades are entered.

    Try using more strict settings.

    Moreover, exiting when MACD is in your own direction is a bit awkward! You exit LONG trades when MACD >= 9.5, I’d say you would exit LONG trades when it’s below zero, wouldn’t you? (the opposite for SHORT trades)

    Besides this, maybe setting a crossover of the two averages, instead of simply checking that one is greater than the other (which leads to so many trades because checking it’s > occurs almost always, while a crossover occurs every N bars).

    It’s a start, don’t be discoureged! Read many topics, study many pieces of code, use part of them to build your own strategy spending time and efforts to achieve better results.

    Usually a strategy crossover, simply put, is not likely to yield good results, you can add a filter, maybe enter when, after a crossover, price retraces and touches again the average(s).

    Learning from (& copying) other strategies will be of great help!

     

    1 user thanked author for this post.
    #150755

    Appreciate it Roberto!

    I’ve been looking at creating the automated programme over the weekend so I’m still getting to grips with it.  I’ve not got a programming background hence trying to pick this up is proving difficult but I’m not gonna give up – I see the promise in this.  It’s just getting the darn thing to work and work consistently.  Whatever combination of indicators used will generate either lower volume, greater accuracy but lower return or the opposite!  granted, I expect losing trades – I guess it’s just striking a good balance.

    Ideally, I just want it to do what’s worked relatively well for me manually – execute and hold through the momentum of trend until it turns. Trying to get it done as a programme is my challenge :/

    #150760

    Yes, what I meant with MACD is that (see attached pic) in an uptrend exiting when it’s ABOVE a certain small value means it will be closed soon, much earlier than the end of the uptrend! (the opposite for downtrends).

     

    #150908

    Appreciate the advice!  I’ve been trialling different setup to reduce the frequency of those trades which instantly open and close with more validation.  I am however, perplexed as to how I can add more validation to prevent weird trades from happening.

    Example; I have setup BUY criteria to trigger on price being higher than 2 periods earlier, my shorter term MA is trending above my longer term MA and there is volume.  The criteria was met however it opened a buy when the momentum was fading and it came off of highs.  Any suggestions on how I can avoid that?  I keep thinking I need validation which effectively says ‘only trigger if there is consecutively trending close prices’ but no idea how to include this.

     

    #150958

    Would you mind posting your latest code?

     

    #150977

    Sure.  See below.  This kind of approach works quite well manually but replicating with conditions, etc..into an automated programme for me as a complete novice programmer 🙁

    #150978

    You can avoid accumulating positions by adding:

    to your conditions at lines 9 and 29.

     

     

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

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