Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
Is it possible to set a hidden USD trailing stop that activates when that $200 is reached and then steps up in a value until price then comes back down and it closes the trades?

If this is possible could you give me an example of entries?
More or less. You just enter 200 in the equity trailing stop field and tick the checkbox. However, it will start working immediately, not when you reach $200 profit. So, a hidden equity trailing stop will be created at the current equity - 200.
 

MrDt

Newbie
Oct 11, 2023
12
0
1
41
Sorry I am struggling to understand, could you help?
for example lets say account balance is 10k and I want equity trailing stop to actuvate once i am past $200 profit. Can i put '10200' in the equity trialing stop (hidden) box?
Or am i miss understanding this...?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
Sorry I am struggling to understand, could you help?
for example lets say account balance is 10k and I want equity trailing stop to actuvate once i am past $200 profit. Can i put '10200' in the equity trialing stop (hidden) box?
Or am i miss understanding this...?
No, that won't work like that. If you put 10200 there, it will trail a distance of 10200 USD. For example, your first equity SL level will be at 0.01 USD once your equity reaches 10200.01 USD.
 

MrDt

Newbie
Oct 11, 2023
12
0
1
41
No, that won't work like that. If you put 10200 there, it will trail a distance of 10200 USD. For example, your first equity SL level will be at 0.01 USD once your equity reaches 10200.01 USD.
Ok thanks for the feedback,
could you help me work how to achieve what I am looking for...?
imagine account balance is 10000 and I have a trade running with a profit target of 200. So when equity reaches 10200 I would like a 'hidden' SL to be activated at that level but then the SL will move up with the profit level - maybe every $10 or pips if dollars isn't possible? until price comes back and it hits wherever the 'hidden' stop has reached.
Is this possible?
Thank you
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
Ok thanks for the feedback,
could you help me work how to achieve what I am looking for...?
imagine account balance is 10000 and I have a trade running with a profit target of 200. So when equity reaches 10200 I would like a 'hidden' SL to be activated at that level but then the SL will move up with the profit level - maybe every $10 or pips if dollars isn't possible? until price comes back and it hits wherever the 'hidden' stop has reached.
Is this possible?
Thank you
You can set up an alert for equity reaching 10200, then when alert is triggered, set the equity trailing stop with the distance 200.
 

MrDt

Newbie
Oct 11, 2023
12
0
1
41
You can set up an alert for equity reaching 10200, then when alert is triggered, set the equity trailing stop with the distance 200.
Ok thank you,
can you confirm for me;

With this setup;

In the 'conditions' tab I set the 'equity >= currency units' at the 10200 I am wanting as my goal.
Then in the 'main' tab I set the 'Equity trailing stop (hidden) USD' to $100

Logic;
I will reach the 10200 goal of a trade and then when i go past this is will step up every 100 usd until it comes back to that level of equity??
So if equity goes to say 10350 without any pull back then pulls back to 10300 it will trigger the close at 10300?

I want to confirm I understand the function and settings correctly?
Thank you
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
Ok thank you,
can you confirm for me;

With this setup;

In the 'conditions' tab I set the 'equity >= currency units' at the 10200 I am wanting as my goal.
Then in the 'main' tab I set the 'Equity trailing stop (hidden) USD' to $100

Logic;
I will reach the 10200 goal of a trade and then when i go past this is will step up every 100 usd until it comes back to that level of equity??
So if equity goes to say 10350 without any pull back then pulls back to 10300 it will trigger the close at 10300?

I want to confirm I understand the function and settings correctly?
Thank you
No, it cannot work like that.

What you can do, is set up it like this:
1. In the Conditions tab you set 'equity >= currency units' at 10200.
2. In the Actions tab, you set only an alert.

Then, when you receive the alert, you do the following:
1. In the Main tab, you set the equity trailing stop to whatever you like - e.g., 100.
2. You remove all other conditions and actions.

Then, if it goes to 10350 without a pullback and then pulls back to 10250 (not sure why you wrote 10300), it will get closed at 10250.
 

MrDt

Newbie
Oct 11, 2023
12
0
1
41
Ok thank you
Is there any way to automate this function as it can move around quickly so wanting for a manual alert could be tricky given the pace of market moving...?
Thanks
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
Ok thank you
Is there any way to automate this function as it can move around quickly so wanting for a manual alert could be tricky given the pace of market moving...?
Thanks
No, but you can set the 100 (or 200) equity trailing stop if you don't mind it triggering even if it goes to 9800 immediately without going up.
 

qzn25

Newbie
Nov 28, 2023
17
0
2
31
Is there a way to configure this for funded firms? that in general both realized and floating losses count?

Let's say put a limiter on it, making it 4% daily (close everything). But does that also include the floating ones?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
Is there a way to configure this for funded firms? that in general both realized and floating losses count?

Let's say put a limiter on it, making it 4% daily (close everything). But does that also include the floating ones?
If you use the Daily profit/loss condition, then yes, it will count both realized and floating profit/loss.
 

qzn25

Newbie
Nov 28, 2023
17
0
2
31
1701528100472.png1701528206776.png
I don't quite understand what I should do, I extracted the entire folder in /experts. I restarted mt5 and the folder appears in "experts" but I have not done any of the next step. How should I continue?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
View attachment 26281View attachment 26282
I don't quite understand what I should do, I extracted the entire folder in /experts. I restarted mt5 and the folder appears in "experts" but I have not done any of the next step. How should I continue?
It looks like is Account Protector got automatically compiled after you restarted the platform. You don't need to do anything else. You can just launch it from there.
 
  • 👍
Reactions: qzn25

Nith

Trader
Dec 6, 2023
4
0
6
37
I get following error when compiling mt5


'PostMessageA' - undeclared identifier Account Protector.mqh 5242 58
',' - unexpected token Account Protector.mqh 5242 142
'GetAncestor' - some operator expected Account Protector.mqh 5242 71
',' - unexpected token Account Protector.mqh 5242 154
',' - unexpected token Account Protector.mqh 5242 161
expression has no effect Account Protector.mqh 5242 156
')' - unexpected token Account Protector.mqh 5242 164
expression has no effect Account Protector.mqh 5242 163
'PostMessageA' - undeclared identifier Account Protector.mqh 5284 59
',' - unexpected token Account Protector.mqh 5284 143
'GetAncestor' - some operator expected Account Protector.mqh 5284 72
',' - unexpected token Account Protector.mqh 5284 155
',' - unexpected token Account Protector.mqh 5284 162
expression has no effect Account Protector.mqh 5284 157
')' - unexpected token Account Protector.mqh 5284 165
expression has no effect Account Protector.mqh 5284 164
'PostMessageA' - undeclared identifier Account Protector.mqh 2918 9
',' - unexpected token Account Protector.mqh 2918 93
'GetAncestor' - some operator expected Account Protector.mqh 2918 22
',' - unexpected token Account Protector.mqh 2918 105
',' - unexpected token Account Protector.mqh 2918 112
expression has no effect Account Protector.mqh 2918 107
')' - unexpected token Account Protector.mqh 2918 115
expression has no effect Account Protector.mqh 2918 114
19 errors, 6 warnings 20 7
 

Nith

Trader
Dec 6, 2023
4
0
6
37
I get following error when compiling mt5


'PostMessageA' - undeclared identifier Account Protector.mqh 5242 58
',' - unexpected token Account Protector.mqh 5242 142
'GetAncestor' - some operator expected Account Protector.mqh 5242 71
',' - unexpected token Account Protector.mqh 5242 154
',' - unexpected token Account Protector.mqh 5242 161
expression has no effect Account Protector.mqh 5242 156
')' - unexpected token Account Protector.mqh 5242 164
expression has no effect Account Protector.mqh 5242 163
'PostMessageA' - undeclared identifier Account Protector.mqh 5284 59
',' - unexpected token Account Protector.mqh 5284 143
'GetAncestor' - some operator expected Account Protector.mqh 5284 72
',' - unexpected token Account Protector.mqh 5284 155
',' - unexpected token Account Protector.mqh 5284 162
expression has no effect Account Protector.mqh 5284 157
')' - unexpected token Account Protector.mqh 5284 165
expression has no effect Account Protector.mqh 5284 164
'PostMessageA' - undeclared identifier Account Protector.mqh 2918 9
',' - unexpected token Account Protector.mqh 2918 93
'GetAncestor' - some operator expected Account Protector.mqh 2918 22
',' - unexpected token Account Protector.mqh 2918 105
',' - unexpected token Account Protector.mqh 2918 112
expression has no effect Account Protector.mqh 2918 107
')' - unexpected token Account Protector.mqh 2918 115
expression has no effect Account Protector.mqh 2918 114
19 errors, 6 warnings 20 7
MT5 V5.00 Build 4040
 

Nith

Trader
Dec 6, 2023
4
0
6
37
yes windows
Post automatically merged:

Are you compiling Account Protector.mq5? What is the first (from the top) error that you receive?
Are you on Windows?
What is the first (from the top) error that you receive?
can't open "C:\Users\a_mah\AppData\Roaming\MetaQuotes\Terminal\C734FF1CA4CACD5026FF92845253E847\MQL5\Experts\WinUser32.mqh" include file Account Protector.mqh 7 11
 

Attachments

  • Screenshot 2023-12-06 194248.png
    Screenshot 2023-12-06 194248.png
    691.7 KB · Views: 1

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com