Mar 12, 2023
4
0
2
49
Trying to learn this amazing EA…
One thing I miss is a timer on actions, often the maknad gives off spikes and it can trigger rules without you wanting it.
I would like to have the ability to set a timer on Action.
When the condition is triggered, a timer is started and if the condition is still thru after(and during) X seconds, only then does the action trigger. If the condition is not met, the timer is reset to be triggered again at the next opportunity.


Then I wonder if you can get the EA to, under a given condition (e.g. floating loss rises to currency), only end the (not several and not parts of) the trade that is furthest from the current marketrate.
Can't get it to work...
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,677
1,374
144
Odesa
www.earnforex.com
Trying to learn this amazing EA…
One thing I miss is a timer on actions, often the maknad gives off spikes and it can trigger rules without you wanting it.
I would like to have the ability to set a timer on Action.
When the condition is triggered, a timer is started and if the condition is still thru after(and during) X seconds, only then does the action trigger. If the condition is not met, the timer is reset to be triggered again at the next opportunity.
That's an interesting idea.
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,677
1,374
144
Odesa
www.earnforex.com
Then I wonder if you can get the EA to, under a given condition (e.g. floating loss rises to currency), only end the (not several and not parts of) the trade that is furthest from the current marketrate.
Can't get it to work...
Perhaps, you could imitate something like that using a Filter by Magic number or by order comment if you can control those.
 
Mar 15, 2023
1
0
0
50
Discuss Account Protector expert advisor here. This EA lets you control your orders and positions with a chart panel. You can ask any questions about this MetaTrader tool here.
Discuss Account Protector expert advisor here. This EA lets you control your orders and positions with a chart panel. You can ask any questions about this MetaTrader tool here.
Hi this doesnt work anymore, i just get an error 313 message?
 

Jack_7

Trader
Apr 10, 2023
7
0
6
28
thanks for the EA , i have a doubt that, i think that EA closes trades in a sequence of order numbers not based on profitability

let me explain u with the example
i have account of 10,000
i opened 3 trades
1st is giving $700 loss
2nd is giving $ 200 profit
3rd is giving $ 300 profit

if i apply earn forex EA it closes 1st trade with $700 loss ... then bal will go down by 7% i.e, it hits DD
but actually my DD is $200 ... i.e, 2% because there's 2 more orders left

so in such cases i need a EA that closes Profit orders first followed by loss trades , why i need it cause many people are trading with prop firm accounts if the EA closes loss trades first it directly hits their DD limit ... plz consider this suggestion and try to add an option to close profit making trades first followed by loss making trades after hitting certain DD limit of that account
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,677
1,374
144
Odesa
www.earnforex.com
thanks for the EA , i have a doubt that, i think that EA closes trades in a sequence of order numbers not based on profitability

let me explain u with the example
i have account of 10,000
i opened 3 trades
1st is giving $700 loss
2nd is giving $ 200 profit
3rd is giving $ 300 profit

if i apply earn forex EA it closes 1st trade with $700 loss ... then bal will go down by 7% i.e, it hits DD
but actually my DD is $200 ... i.e, 2% because there's 2 more orders left

so in such cases i need a EA that closes Profit orders first followed by loss trades , why i need it cause many people are trading with prop firm accounts if the EA closes loss trades first it directly hits their DD limit ... plz consider this suggestion and try to add an option to close profit making trades first followed by loss making trades after hitting certain DD limit of that account
Are you sure your prop firm is tracking drawdown by balance and not by equity? Most prop firms track drawdown by equity.
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,677
1,374
144
Odesa
www.earnforex.com
Yes... MFF consider both Balance and Equity Drawdowns
Unfortunately, there is no option to close most profitable trades first regardless of the chosen condition.
If you tell me which version you are using (MT4 or MT5), I'd be able to suggest you a code edit that would make it always close most profitable trades fitst.
 
  • ℹ️
Reactions: EnrichWave

Jack_7

Trader
Apr 10, 2023
7
0
6
28
Unfortunately, there is no option to close most profitable trades first regardless of the chosen condition.
If you tell me which version you are using (MT4 or MT5), I'd be able to suggest you a code edit that would make it always close most profitable trades fitst.
Glad to hear that , I'm using MT5
 

Jack_7

Trader
Apr 10, 2023
7
0
6
28
You can add the following two lines after the current line 3810 in AccountProtector.mqh:
MQL5:
        DirectSorting = true;
        ArraySort(PositionsByProfit);
Make sure to test on demo first.
I hope , i pasted at the right spot ... plz check it in below screenshots , i applied the changes and i tried multiple times yet EA isn't closing profits first it's just closing in random manner
 

Attachments

  • Screenshot_20230411_200405.png
    Screenshot_20230411_200405.png
    166.6 KB · Views: 5
  • Screenshot_20230411_200509.png
    Screenshot_20230411_200509.png
    20.7 KB · Views: 5