Programming a risk limiter for MT4
Results 1 to 6 of 36

Thread: Programming a risk limiter for MT4

  1. #1
    Hi Everybody,
    Earlier this week I posted a thread to acquire some advise/leads concerning the construction of a Risk Limiter. I originally thought of VT trader. But am considering MT4. But if a trading appliions might be recommended by anyone I'm open.

    Part 1. Basically, the program would connect the account balance to a auto stoploss placement mechanism. Based on the amount of units traded, the machine would automatically compute the stoploss that the draw was 2% of the over all account equilibrium.

    Part 2. The machine would also incorporate a timed lock-out mechanism (like the time locks onto a bank vault). When the account has endured a 2% drawdown (stoploss is hit), the machine would not permit any more trades to be put until 12:01 a.m. the next day.

    Part 3. The machine would also incorporate a calander lock-out in order, at case of 6% draw down in a single week, the machine would not permit any more trades until 12:01 a.m. the next Monday.

    Part 4. The exact same calander lock-out would be also used by the machine to prevent any changes to the lock-out parameters that are trading except for a 12 hour period that begins on the first evening of every month at 12:01, and ends at 12:00 pm that day.

  2. #2
    Part 1: Your risk calculation is backwards from calculations. The stop dimensions will determine the dimensions of the purchase. Different market conditions require different stop amounts. If that is how you want it, then there are. AccountBalance() will return the current account balance not including any open positions. There is also MarketInfo which may return the significance of each pip predied on a lot.

    Part 2: At the start of each day, copy AccountBalance() to a variable and compare it to the current equilibrium. If it exceeds 2% shift set a flag which stops trading. The flag and the account balance get reset at the start of a new moment.

    Part 3: Much like part two only copy equilibrium to another factor each monday and monitor equilibrium change during the week.

    Part 4: Since this EA is for your own personal use, it would be simpler to just exercise restraint on your part.

    You might want to take into account the most drawdown be obtained in the peak value during each period. So lets say you start with 10,000 and the balance goes up during a day, you might want to think about resetting the balance it computes the loss from in an effort to safeguard your profits.

    Good fortune.

  3. #3
    Quote Originally Posted by ;
    Part 1: Your risk calculation is backwards from ordinary calculations. The stop dimensions will determine the dimensions of the purchase. Different market conditions require different stop levels. If that is the way you would like it, then there are. AccountBalance() will return the current account balance not containing any open positions. There is also MarketInfo which may return the value for every pip predied on a lot.

    Component 2: In the beginning of every day, replie AccountBalance() to a variable and examine it...
    Can what I am looking to be automated? That I dont have to copy anything? Your peak worth suggestion is excellent! Thanks. Is there a place where developers are available. Since you may have been in a position to tell, I am not a programmer.

  4. #4
    Strangely enough, I think Magnumfreak is a programmer.

  5. #5
    Quote Originally Posted by ;
    Strangely enough, I think Magnumfreak is a programmer.
    Do you utilize MT4? What do you think about what I am trying to do? Can it be achieved?? (I understand, anything could be accomplished with sufficient money. . .but is this really tough??)

  6. #6
    Yes, I use MT4

    It is all possible, and not really that difficult.

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.