Money management type automated switching

Forums ProRealTime English forum ProOrder support Money management type automated switching

Viewing 10 posts - 1 through 10 (of 10 total)
  • #116482

    Following on from an idea that I had in a discussion elsewhere I have coded this modification of one of my (I think it was mine!) money management systems. This version now automates the switch from one money management type to another after a certain number of trades has occurred and the strategy has reached a certain level of profit. This means for example that you can start trading without money management and then once 100 trades has happened and the strategy has reached 5% profit then money management can be turned on and position size increased based on your equity.

    If you don’t want to switch then set both money management types to the same value.

    I have just written this and have not tested it as time is short today. I think it should work but if someone else wants to test it for me that would be great as I rarely code anything correct first time! I just had to get this idea started while I ate my breakfast!

     

    3 users thanked author for this post.
    #116487

    How about a further mod … turn the MM back off if the last * Trades made * per cent Loss?

     

    #116510

    See here for a > £3k difference due to your code above Vonasi!

    Nice one, thank you!

    https://www.prorealcode.com/topic/dow-2h-trend-chaser-v4-mm/#post-116508

     

    #116526

    How about a further mod … turn the MM back off if the last * Trades made * per cent Loss?

    Keeping a track of the last x trades would really require arrays to store the trade data. Without them we would really only be able to code for a very limited number of trades and it would all be a bit clunky as coding goes!

    Another option is to record the highest equity and switch off money management if equity then falls x% below this. So if draw down is higher than expected then we can return to minimum stake size. What do you think?

    1 user thanked author for this post.
    #116527

    Here is the idea in my last post.

    It works the same as the first version for switching money management types after x trades and x% profit has been reached. It also records the highest equity and if draw down reaches a set level then it switched the money management back to your chosen type 1. At this point the trade count is reset to zero. Then if the strategy starts performing well again then once there has been enough trades and profit has risen the desired level above the highest equity then the money management type is changed back to your chosen type 2.

    I also added a function to stop the strategy if a maximum draw down level has occurred. This is draw down from the maximum equity achieved. Only closed positions are considered.

    (not tested much!)

     

    1 user thanked author for this post.
    #116555

    Above added as Log 194 here …

    Snippet Link Library

    1 user thanked author for this post.
    #116577

    After a little testing I spotted a cut and paste error that stopped the money management working with position sizes less than 1. I’ve corrected the code in the previous posts.

    #116579

    I’ve had the idea that switching the money management on or back on would be best done after a rise from a lowest equity. So for example we have a 5% draw down and so money management is switched off and we trade just level stakes at minimum position size but the strategy continues to perform badly and equity continues to drop. Eventually it rises from a low point by 10% and so we switch money management back on.

    It’s too late now to code it so I’ll try to find some time tomorrow or add it to my list!

    #121484

    In the first code.

     

    As i do so that the máximum position Is 10€ pip And continúe trading with the figure.

     

    And if someOne can explain The “switches”, or i dont know, ir they dont work.

    Thanks!!!

    #121581

    Si.

    I have solution.

     

    Thanks???

Viewing 10 posts - 1 through 10 (of 10 total)

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