Results 1 to 2 of 2
 2 Attachment(s)    

Thread: Balance/Equity EA for multiple EA's

  1. #1

    Default Balance/Equity EA for multiple EA's

    Hi Funyoo,

    Do you think you could code this Balance/Equity custom indy into an EA please. Basically the EA can be use for one or several EA's.

    The Idea is to close all open positions once the differences between the Balance and Equity reaches a specified target via extern option, as you can see in the picture the bold green line is the balance amount and the red line is the equity. As the red line moves down away from the balance line the more profit gained.

    I think this is a good tool for multiple EA's runing, once the specified target is reached this EA closes all positions, then the other EA's start buying or selling again.

    Please use the current indy's extern options all well because you need to specify your acount balance first. Hope you can spare some time for this

    Attached Images Attached Images Balance/Equity EA for multiple EA's-bal_eq_ea-gif 
    Attached Files Attached Files

  2. #2


    You don't need to use the indicator to do this. Somebody asked on a different forum some time back how you would do a similar sort of thing once the profit reached a certain level.

    I pasted the following block of code for him to use in an EA.

    int start()
    else return(0);
    void CloseAll()
    int total = OrdersTotal();
    for (int cnt = 0 ; cnt < total ; cnt++)
    OrderClose(OrderTicket(),OrderLots(),Bid,Slippage, Color);
    OrderClose(OrderTicket(),OrderLots(),Ask,Slippage, Color);
    You would need to define "ACCOUNTPROFITDOLLARS" as an external integer (dollars only) or double (dollars and cents) in Global Scope first.

    If you also wanted to incorporate the account balance into the conditions then this is easy too.

Similar Threads

  1. Virtual balance
    By fxtester in forum Indicators
    Replies: 1
    Last Post: 02-19-2015, 16:34
  2. How to protect balance?
    By almatias in forum MQL programming
    Replies: 1
    Last Post: 08-07-2010, 09:04
  3. Balance Profit Manager
    By hameed412412 in forum Ideas for expert advisors
    Replies: 2
    Last Post: 10-25-2009, 16:41
  4. Balance and Equity in the strategy tester
    By funyoo in forum Indicators
    Replies: 0
    Last Post: 04-18-2009, 11:49

Tags for this Thread

color, funyoo, indicator, profit, slippage, time, tool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts