ProfitDog EA (watch dog for your profit targets)
Results 1 to 3 of 33

Thread: ProfitDog EA (watch dog for your profit targets)

  1. #1
    Only designed for myself. That really is a profit watchdog expert advisor. Very simple but handy.
    It watches for your Profit Target Or ProfitPercentage Target as you're away.
    When It sees your Profit Target is accomplished or ProfitPercentage goal is achieved, (whichever comes first)
    It closes all open positions. Works independently on any chart.

    Default values:
    ProfitPercentage=5 percent;
    ProfitUSD=1000USD;

    it's possible to change these two input values. And dont forget to allow EAs.
    Enjoy

    Edit: This ea closes a maximum of 10 open orders.
    I increased amount to 100. It is possible to download ProfitDog_v1 at article #2 instead.
    Because of RaptorUK for noticing.
    https://www.forexsoutheast.asia/atta...1874715292.mq4

  2. #2
    Quote Originally Posted by ;
    quote Unless you've got more than 10 open orders, then some will not close, why not decrement in a loop from OrdersTotal() -1 to 0? Http://forum.mql4.com/48352 What happens when an OrderClose() fails? Why not report any related errors? Http://forum.mql4.com/48276
    Opps, I have to create it 100 I had been so focused on idea, didnt notice number. .

    Let me clarify why not orderstotal()-1 and simple a major number like 100.
    On your way, if you encounter (you probably encounter requoting or context busy) error, then you loose your opportunity to shut it.
    But should you try 100 times and everytime near 0th order, you shut all. Indeed a very good way to resist requoting errors. without indexing.

    And it's harmless looping 100 times, since after closing orders, loop lasts less than microseconds. If you cant shut it, then
    just scrutinizing journal. .
    You're right it's a fantastic practice to handle errors. . It's like using shield gloves in woodwork
    I corrected 10 as 100. . And also added printing errors
    attacking you.
    https://www.forexsoutheast.asia/atta...1702126299.mq4

  3. #3
    Quote Originally Posted by ;
    Just designed for myself. This is a profit watchdog expert advisor. Very straightforward but convenient. It watches to your Profit Target Or ProfitPercentage Goal as you are away. If it sees your Profit Goal is achieved or ProfitPercentage target is accomplished, (whichever comes first) It closes all open positions. Works independently on any chart. Default values: ProfitPercentage=5%; ProfitUSD=1000USD; You can alter these two input values. And remember to allow EAs. Enjoy document
    Unless you've got over 10 open orders, then some won't shut, why not decrement at a loop out of OrdersTotal() -1 to 0?
    Http://forum.mql4.com/48352

    What happens if an OrderClose() fails? Why don't you report any errors that are associated?
    http://forum.mql4.com/48276

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.