ProfitKeeper: Automated closeAll take profit tool.

Discussion in 'Forex' started by ybfjax, Sep 2, 2011.

  1. ybfjax

    ybfjax

    There were many people requesting some type of equity monitoring tool that can lock in profits after a pre-determined account equity is reached (e.g. close all open trades when profit target is hit). Profitkeeper was built to fulfill this gap for professional and casual traders looking to focus on the bottom line of their equity. This was designed mainly for cost averaging strategies, and martingale lovers will probably see this as very useful. Anyone looking for an ability to forward-test any type of entry strategy to see how well they would perform after the fact can use ProfitKeeper.

    Because of the compounding ability, this is great for larger accounts like hedge funds. my friend Maat and myself I use this tool daily on VPS to test like 30-50 demo accounts of varying strategies. He decided to give it away for free as we later incorporated the functionality into entry EAs to build a complete system (entry/exit handled by one EA). Hopefully maat will will update with a video tutorial maybe in a week or so.

    Installation: Profitkeeper_EA_FREE.ex4 file belongs in '...\experts folder'. profitkeeper.dll goes in '...\experts\libraries' folder. Ex4 file was compiled in mt4 build 402. Should work in previous/later versions without problem.

    - restart MT4. You should see Profitkeeper_EA_FREE in the navigator 'expert advisors' folder. Drag it to any open chart.

    If you did everything correctly, your chart should look something like the image in the zip file.

    Best to use a 1 Minute Chart. Not for the calculations, but the closeall draws triangles and dashed lines for all of the trades it closes. Longer timeframes will make the chart become very messy when closing many trades.

    There is a separate .png file that explains the inputs. It may look a little intimidating to the uninitiated, but once you get used to it you'll probably never go back to trading manual TP again.

    Notes: for email functionality, you must properly setup email settings in MT4 email tab [Tools > Options > Email].
    - use only 1 PK per terminal
    - The PK uses a time loop (checking account equity twice per second), so you can trade multiple pairs and focus on net profits. The drawback is that you cannot change the EA input settings once the EA is started. To change settings, you must remove the EA from chart, delete the profitkeeper.ini file [...\experts\libraries], and then apply PK to chart again.
    - take extra care when using multiple sets (compounding/scaling). Attention to detail is important, especially when using live account.
    - there is a 400-500 character limit that MT4 has when pulling values from a preset file (.set) . So if you have a very long list of values, when you load the preset, you may have to manually re-copy/paste inputs for those fields prior to starting PK.
    - there is a "resume" feature in case of computer/terminal crash and restart unattended, but it is much better to use an always-on computer. The resume feature will also not work correctly if using long inputs (400+ characters)

    I hope that's everything. Constructive feedback is appreciated.
     
  2. Good1

    Good1

    Thank you.

    But the attachment is not downloading as a zip file for me. Can't really tell what kind of file it is except that its a binary. Is this the .dll ?
     
  3. ybfjax

    ybfjax

    Very weird. do you have some sort of download manager that is interrupting the download? I find that extremely weird that you cannot download it. zip file has all the instructions, dll, ex4 file, etc) maybe it is corrupt? would have heard something by now. Anyway, perhaps the rar file attached will better solve your problem?

    Speaking of which, perhaps there should be some video uploaded soon. It can be a bit complex to the uninitiated.
     
  4. Good1

    Good1

    Same results. When i check the properties of the file i get 176 KB. Type of file = "file". When i open it with Notepad++ it looks like a binary ( i can't read it).

    I'm usually able to handle .rar downloads. So if this is a rar i should be able to handle it. Not sure why i can't. Are you sure Elite Trader allows what you are trying to store?
     
  5. download it and add .zip to it then unzip.
    it's virusfree according to MS security Essentials
     
  6. ybfjax

    ybfjax

    You were able to download it ok with no problems? If anyone else is having problems, PM with email or go to .com and you can get copy.

    There is 1 bug recently discovered. Any individual input value over 99,999,999 will crash the EA. NOT the total amount combined of the input, just any one comma separated input value is over 99,999,999.99 This shouldn't affect most clients that are trading with under $100 million, but an updated one will be uploaded soon.
     
  7. This is exactly the strategy I have been using. When I was day trading life was very simple. Just figure out how much I made or lost for the day. But now that I hold overnight and hopefully position trade, everything is based on the bottom line.

    For instance, when I get stopped out, it doesn't even budge the bottom line. I was in now I'm out, but that doesn't change the account balance. Same with taking profits. Like last week, I had 3 large profits and figured I better take them because I needed to cover a lot of small losses. So I took them, and there they were, 3 big nice profits, but it didn't change my account balance one iota (other than losing the spread plus commissions.)

    The big wins have occured waiting for the account balance to reach a new high by a considerable amount and then just at that instant (in fx it can happen quickly and then disappear just as quickly) close everything out. All winners small and large and all losers (which are always small).

    And that is the only time I am flat, and I take a day off and sweep the account, then start all over again.

    Not sure why a small trader like me would need to automate, other than to do it when I'm taking one of my rare naps. When I get close, I just set up mkt orders to close on all positions (I only usually have about 7 on) and then I just use the IB "transmit all" button and then hit the IB "cancel all" to cancel my stops and I'm done.
     
  8. And even then, I've just been sitting here this weekend thinking, why close out everything at all? Just because I have a new high in my account? I can sweep it if I want to without touching anything.

    All closing everything out does is get you flat and then you have to get back in, and that usually involves getting stopped out a lot until you get everything working your way.

    Plus I may have closed out a particularly good one that I could have left on for years. (Like gold.)

    But the whole thing is kind of interesting. Looking at the big picture vs taking care of the individual trades and hope that the big picture will take care of itself.

    I've just noticed that before I close everything out, there is a certain energy you can feel and you know it is a special moment in the market. And once it's gone it goes right back to the daily grind.
     
  9. ybfjax

    ybfjax

    The profitkeeper tool has a "fund manager" feel to it. It allows you to trade with the same objectivity as the big boys. You can refine your entry aspect more, and scale aggressively without sacrificing the ability to grab those profits. It really dispells several myths about market accuracy, especially trying to count winning vs losing trades. It's more about how to play the game consistently, and capitalizing from position sizing.

    MT4 especially needs this type of tool because unlike futures and mt5, every order ticket is treated individually in mt4.

    Again, it becomes less and less about trying to win each trade and more about the bottom line. That's why position sizing is so important. For those people who think in terms of pips, just multiply the pips you expect by the

    The original design was to take advantage of multiple pairs, usually negatively correlated. Since the pairs don't move exactly the same, you take advantage of the difference with the profitkeeper script. I learned that you could just trade 1 pair this same way.

    BTW, you don't need to trade with individual stops or TP on each trade ticket. The basket closeall takes care of this. the key to making this work unattended is to use a VPS (always on, always connected windows server).
    there is not one trader that could not benefit from automating part or all of their strategy, unless of course it is a losing strategy and you are not ready to admit it to yourself yet. But still, by observing the repetitions of your strategy outside of yourself, you can identify deficiencies and test/apply corrections. It is very difficult to make observations objectively in the moment, unless you've mastered Jed McKenna's Spiritual Autolysis or Don Miguel's 4 Agreements.

    An alternative to this would be to record your desktop screen while you are manually trading. It is much slower, and more prone to error in interpretation, but would accomplish a similar objective in taking a closer look at fundamental aspects of the trading strategy and seeing what can be improved.

    The profitkeeper was used as a separate tool to exit positions and there was a separate EA that opened trades on a grid. But both ea's were combined into one, so standalone profitkeeper was no longer necessary.
     
  10. I hear ya, It wasn't until just recently I started trading fx and quickly realized I didn't just have on a position, I had a whole portfolio which in most cases is spread one way or the other, and I started looking at the whole thing rather than just each trade.

    So I'm with you man, but I'm always skeptical whenever I come up with a good idea.

    So I never did get the deal, where do I go for more info? I need one of those red links.
     
    #10     Oct 9, 2011