Trading system template

Forums ProRealTime English forum ProOrder support Trading system template

Viewing 15 posts - 1 through 15 (of 24 total)
  • #186397

    Hi all,

    I have been using a template I created for my strategies which is based on some fundamental trading principles that I personally find important.

    the concept for creation is that trade management is more important than how you enter a trade and the whole template is to operate under the fact that the market is always random, ie you can enter at any moment and the probability of the trade moving 1 tick in your direction is 50%, therefore:

    I utilise scaling to increase probability at the cost of risk reward(on paper), scaling is utilised in both entries and exits.

    the system starts by risking 50% of equity and the system will also auto scale up on size based on equity until it reaches a certain amount of contracts(r) and will then reduce overall risk by lowering the risk ratio on equity to avoid loosing to much money in a single trade as the account grows.

    I have started working on a version that also includes predicting liquidity and scaling in to full size, but it is just preliminary thoughts put to basic code.

    I have been applying this outline across multiple systems and time frames and found even a poor strategy can be reasonable profitable.

    I will attach results and code for v5 and liquidity v6 below minus my custom entries and exits (which a merely price action breakout/failure based + a custom indictor on 1 min charts), there is no point sharing exact exits etc as liquidity would neutralise the strategy anyway.

    I would appreciate some input on optimization and ideas for trade management as I am not a very experienced programmer (not even close) and maybe people might find applying some principles helps their systems.

     

     

    #186402

    I forgot to mention risk increases and decreases exponentially so on a winning streak the strategies will step it up, and when loosing they will scale down until winning again.

    #186403

    I would also like to have user inputs on my strategies similar to indicators but I am bot sure if that is possible on v11, maybe on a later version we could have user input variables.

    #186410

    Some other things I would like to build in are.

    Stop trading if system exceeds set max expected drawdown%

    Stop trading if system exceeds max predicted simultaneously losses

    And other data gained from system analysis.

    #186416

    Hopefully the mods (@JC_Bywan, @robertogozzi) can split this into its own dedicated topic before we start responding to a nice topic which is very much off-topic in the Trading Template topic from nonetheless ?
    (and throw out this post from me 🙂

    #186418

    I moved it to ProOrder support.

    Despite a similar title, this is different from nonetheless’topic, there’s no need to change, I believe.

     

    #186428

    Hi there Kev,

    A couple of responses from my side. Here is a first one :

     

     

    I would also like to have user inputs on my strategies similar to indicators but I am bot sure if that is possible on v11

    See the attachments;
    The first one I assume you will recognise (top-left in the Editor).
    The second one you will find in the right-hand pane of the Editor. Click that. You will all your defined “Optimisation” parameters in there. This is for BackTesting.

    If you now prepare for Automatic Trading (3rd attachment) you will find input fields for all the variables you left from optimisation. “Left there” or just created for the purpose.

    So Yes, possible …

    Regards,
    Peter

     

     

     

    #186432

    What you are doing there seems a nice approach. Mind you please, this is subjective.

    What is subjective as well, is my idea that this does not work well in practice. This is from quite explicit experience, attempting the same. This does not mean it can’t work, but at least I could not do it. Also, theoretically if chances would be 50% indeed (and they are not because markets are trending) then you would always lose on the spread (or commission) to pay. Thus now theoretically it can not work. 🙂

    But we are not (ever) here to debunk one’s theories or strategies, so I am not doing that either. The contrary, I am intrigued. And others may be too. However :

     

    I will attach results and code for v5 and liquidity v6 below minus my custom entries and exits (which a merely price action breakout/failure based + a custom indictor on 1 min charts), there is no point sharing exact exits etc as liquidity would neutralise the strategy anyway.

    I feel that you could be making a mistake there. I mean, people will always be eager to try something “new” and see what it brings them. From there they will bring the adjustments you may actually be asking for. But there it nothing much to do in this case; There is no beginning and no end to it (haha). So my advice would be to put something to your TRENDF, myBC, e1, ex1 and EX2 – so that people can paste your code and give it a try. And it should give some positive result to begin with.

    So there’s your first 2c. 🙂

    #186437

    Stop trading if system exceeds set max expected drawdown% Stop trading if system exceeds max predicted simultaneously losses

    This MM code by Vonasi includes a quit function for max drawdown and other safeguards:

     

    1 user thanked author for this post.
    #186514

    “What is s theoretically if chances would be 50% indeed (and they are not because markets are trending) then you would always lose on the spread (or commission) to pay. “

    ah yes that was just an example, obviously we increase probability, but the ‘1 tick’ is just an example,

    ‘INPROFIT’ is the line I use to ensure a certain amount of ticks to cover commissions etc, I have a bit of an Al brooks type way of thinking about the market, but I am only 1 year into trading.

    The thing I have found with these lower time frame strategies is they will only work for a short time, so I have made this template to maximise profits in that time but still finish in profit when the system becomes inefficient, the entry and exit signals were not curve fitted but when tested ‘out of sample’ the strategy would need roughly double the starting capital to begin.

    The variables will have to be changed when using different entries and exits and on different symbols, it is best to start with only 1 entry and exit then add in a second one when the first is profitable, the scaling apporach will see a 50% win rate go to 80% most of the time, but on paper the risk reward will be worse so I am aiming for a good ‘gain loss ratio’ instead.

    I have modified a double bottom detector that I got from prorealcode, to output a histogram of +1 or -1 for bull or bear breakouts and the results posted above are from that, combined with my own indicator ‘trendf’ the later I may share oneday but first i need to recoup the losses I have had in my first year of trading.

     (attached modified double bottom, feel free to move it to that thread if you want)

    #186524

    thats great thanks Peter, I have only just gotten to the point where i understand how to run optimizations so i have not tried to launch a live strategy from post optimizing yet. thankyou.

    #186527

    Hi Kev – It is nice to read your deliberations. They may urge for a “please be cautious”, which idea I already had after reading your first post. To me it may seem that you too easily take it for granted that you will gain some money with this, while virtually nobody does.
    Run your strategies in Demo for many months … and you will see (?) that after two days you are not satisfied because something unexpected happens, so you will never reach those “many months”. However, it will be the representation of what would have happened in Live.

     

    but first i need to recoup the losses I have had in my first year of trading.

    I sure hope that you don’t think that you will be able to do that with an AuoTrading algorithm. The device is to first be able to trade with profit, so from there you can try to automate your knowledge and profit (indeed) from staying away from emotions and/or utilise the response speed of that algorithm. I think everybody will tell you similar.

    Might you need the money (which is not what I expect ;-)) then stay out of this all together.
    If you don’t need the money then take all the time it takes for running all in Demo. Does it work there ? then go for it !

    #186538

    If you don’t need the money then take all the time it takes for running all in Demo. Does it work there ? then go for it !

    yes i am only running in demo at the moment because i do need the money 🙂 i spent enough money trading this year, so I am even manually trading in simulator while doing a funded trader challenge, so i wont be spending any more of my own money (besides subscribtion)

    I am curious how do you feel about automating on 1 min time frame? I have been running some of my algos this year with mixed results but I find it hard to get many to stay consistently profitable for more than a fraction of the backtest period when they are made live.

    I do have some automated systems that have managed to stay profitable but they are just ridiculously selective and they are trading on 5 min+ time frames.

    I will be sticking to just letting them run on backtest in real time for now.

    I have been thinking that maybe the way i should be using lower time frame algos is like a toolset, build a few for different market conditions and then select the one for the job on the day…. maybe i need to buy a book on the subject.

    #186554

    I am curious how do you feel about automating on 1 min time frame?

    Well, I could be about the only one in this community using a 1 second TimeFrame, but which is Forex. Personally I wouldn’t even be able to use longer timeframes, just because I wouldn’t be able to find the entries (with Forex), which I now find by technical means. Otherwise, and as I told before, I try to work quite exactly the same as you, but as told that doesn’t work out mostly (my code is fully stuffed with all such attempts).
    Otherwise, the advantage I seem to have is the fact (?) that the Strategies I have are winning, so all it requires is adding new ideas and see whether they work out for the better. This is the most convenient …

    And, without much exception you will find everybody in here having difficulties with the shorter timeframes; it was a discussion only a few weeks back.

     

    I find it hard to get many to stay consistently profitable for more than a fraction of the backtest period when they are made live.

    May it help you, or anyone, look at the below two backtest results in the 1st and 2nd attachment. The first one is from today, and the second one from two weeks or so ago. Time span is always one month.

    Both earn about equally, but it will be clear that the first one looks better. Btw, yours looks as good (from your first post), so nothing wrong there or anywhere. However, what I did the past two weeks, was only smoothing out them peaks and dips by means of looking what actually happens and do something about it. Not a single optimisation step in there. Only applying stuff. Stuff that would minimise subsequent losses (easy to see the result of it). You can also see that this is not about more gain (your thinking ;-)) and it is at the cost of Risk/Reward (your thinking again).

    For further reference I added the third screenshot;
    Gain is about the same, and this is only until last week (so one day less of “trading”). Watch closely how the start of it looks (compare with the most current one – in the first attachment) and where an occurring gain ever back on the 22nd must be lacking today because the backtest now starts at the 24th. What many people won’t “see” is that the different starting point will imply a different trading sequence. And oh, it will sync along the way (could last a day or more), but the start will never be the same. Anyway … what the third attachment shows is that the gain is “topping” – and this is something I don’t like. So what happened (compare with the first attachment again) is that the peak you see on the 14th is actually traded off with more gain after it. And yes, it will be hard to believe that such things can be done, but this is how things work out when one sort of thinks like you do. The mechanism is always the attempt to diminish the subsequent losses (and it will be easy to understand how they will create the dips). That mechanism is just a workable one (I mean, one can deal with that) – as long as it does not go by optimisation. An easy to understand (and known) example is to skip a trade (coding such a thing  may not be for everyone). Two losses after all ? then apply something else again.
    The fun (for me) is that all is a tradeoff. Thus, I could stop trading for an hour as a solution to the above, but with 175-200 trades per month, you can do the math on how much profitable trades I will miss and that thus the net gain goes less because of that (hey, once you have that “known” winning strategy to begin with – only then). I like these “tensions” the best, as it is all technical stuff and the only instance which would be able to trade like that will be the computer.

    2 users thanked author for this post.
    #186564

    That’s a great explanation thankyou, it will take me some time to process and understand everything you have said. I really appreciate it.

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

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