lm5trader

Newbie
Aug 12, 2024
5
0
2
33
Hi, thank you for the AP, it’s great!

Looking for some help from someone please on closing a trade when a trade falls by a number of pips? I have been playing with the conditions ‘Floating loss falls to a number of points’, likewise ‘floating loss rises’, to no success.

Can someone advise;
if I am in a long trade on XAUUSD, entered at 2500.00 , and it falls to 2498.00,
what condition and what value do I need to input to close that trade?

Thanks
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
Hi, thank you for the AP, it’s great!

Looking for some help from someone please on closing a trade when a trade falls by a number of pips? I have been playing with the conditions ‘Floating loss falls to a number of points’, likewise ‘floating loss rises’, to no success.

Can someone advise;
if I am in a long trade on XAUUSD, entered at 2500.00 , and it falls to 2498.00,
what condition and what value do I need to input to close that trade?

Thanks
You can use the Current price <= condition for that. But, in my opinion, in such a simple case, it makes sense to just use a plain stop-loss on your trade.
 

lm5trader

Newbie
Aug 12, 2024
5
0
2
33
You can use the Current price <= condition for that. But, in my opinion, in such a simple case, it makes sense to just use a plain stop-loss on your trade.
Thanks for your response Enivid. The EA I’m using does not have the input option of a stop loss, as it is a martingale EA. Likewise, current price won’t work, as that changes on every trade entered.

I think floating point is the right condition, however every time I try, it either instantly closes a trade when I perceive the condition hasn’t been met, or doesn’t close it when I perceive the condition has been met???
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
Thanks for your response Enivid. The EA I’m using does not have the input option of a stop loss, as it is a martingale EA. Likewise, current price won’t work, as that changes on every trade entered.

I think floating point is the right condition, however every time I try, it either instantly closes a trade when I perceive the condition hasn’t been met, or doesn’t close it when I perceive the condition has been met???
Floating loss rises to number of points is the right condition for you then. Make sure you are setting the value correctly based on the points your broker uses in XAUUSD quotes. For example, if it's quoted as 2500.00 and you need it to trigger when it goes down to 2498.00, it's 200 points. However, if there are more decimal places, e.g., 2500.000, then that's 2000 points. I hope it's clear.
 
  • 👍
Reactions: lm5trader

lm5trader

Newbie
Aug 12, 2024
5
0
2
33
Floating loss rises to number of points is the right condition for you then. Make sure you are setting the value correctly based on the points your broker uses in XAUUSD quotes. For example, if it's quoted as 2500.00 and you need it to trigger when it goes down to 2498.00, it's 200 points. However, if there are more decimal places, e.g., 2500.000, then that's 2000 points. I hope it's clear.
Thanks Enivid! Think I’ve crack it! Appreciate your help
 

Whitehalla

Newbie
Aug 28, 2024
2
0
1
38
Hi

Firstly this is a great EA, many thanks. Can I ask. The option Daily profit/loss>=Currency Units - does this take in to account drawdown / open trades. For instance. If I wanted to close all trades and disable auto trading when closed profit >=£100 but I had -£50 in open trades we would have a positive position of +£50, how would the ea work?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
Firstly this is a great EA, many thanks. Can I ask. The option Daily profit/loss>=Currency Units - does this take in to account drawdown / open trades. For instance. If I wanted to close all trades and disable auto trading when closed profit >=£100 but I had -£50 in open trades we would have a positive position of +£50, how would the ea work?
Daily profit/loss conditions take into account both closed and running profit/loss. If you want to use a condition based on closed profit, you can use the balance-based conditions.
 
  • 👍
Reactions: Whitehalla

Whitehalla

Newbie
Aug 28, 2024
2
0
1
38
Daily profit/loss conditions take into account both closed and running profit/loss. If you want to use a condition based on closed profit, you can use the balance-based conditions.
Great stuff, that makes sense. If my daily profit has been reached and it takes the selected action this is great. Now if I then try to enable it again for the following evening in preparation for the new session it disables the actions as the daily target has been met. Is there any way force it not to reset? Also, in the guide it states that using the time feature can be auto repeated (ie, same actions at the same time every day), I can’t seem to see how this is enabled. Am I missing something?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
Great stuff, that makes sense. If my daily profit has been reached and it takes the selected action this is great. Now if I then try to enable it again for the following evening in preparation for the new session it disables the actions as the daily target has been met. Is there any way force it not to reset? Also, in the guide it states that using the time feature can be auto repeated (ie, same actions at the same time every day), I can’t seem to see how this is enabled. Am I missing something?
The Timer is found on the Main tab of the panel. You can prevent disabling the actions via the input parameters (DoNotDisableActions).
 

GBPMaster

Trader
Aug 29, 2024
7
0
7
37
I have some problem with AP MT5 Ver1.11.
1. I used closed all (100%) positions when floating drawdown hit % target but when it hitted, AP closed but miss last one. The last one remain on working position and not closed.
2. When i used function disable when daily profit reached % balance. I disabled when floating profit hitted condition. It is floating profit or profit closed?
Thanks for your help!
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
I have some problem with AP MT5 Ver1.11.
1. I used closed all (100%) positions when floating drawdown hit % target but when it hitted, AP closed but miss last one. The last one remain on working position and not closed.
Please check the logs to see what happened.
2. When i used function disable when daily profit reached % balance. I disabled when floating profit hitted condition. It is floating profit or profit closed?
Thanks for your help!
Daily profit conditions include both realized and unrealized profit.
How can find balance base?
I've just realized that we don't have any conditions that would work strictly with realized profit. I will add some in the next release.
 
  • 👍
Reactions: GBPMaster

MrMaths

Newbie
Sep 1, 2024
7
0
2
45
when the action to close all positions 100% losing trades, is there an order in which they are closed? Is it the biggest loss trade is closed first? or the oldest trade closed first?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
when the action to close all positions 100% losing trades, is there an order in which they are closed? Is it the biggest loss trade is closed first? or the oldest trade closed first?
By default, there is no particular order - it closes them as fast as possible without sorting. However, there is the CloseFirst input parameter that let's you set the order you prefer.
 
  • 👍
Reactions: MrMaths

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
I have some problem with AP MT5 Ver1.11.
1. I used closed all (100%) positions when floating drawdown hit % target but when it hitted, AP closed but miss last one. The last one remain on working position and not closed.
2. When i used function disable when daily profit reached % balance. I disabled when floating profit hitted condition. It is floating profit or profit closed?
Thanks for your help!
Sorry! I totally forgot about the input parameter called CountFloatingInDailyPL. If you set it to false, it will only count realized profit for daily loss/profit and will ignore floating profit/loss.
 
  • 👍
Reactions: GBPMaster

GBPMaster

Trader
Aug 29, 2024
7
0
7
37
Sorry! I totally forgot about the input parameter called CountFloatingInDailyPL. If you set it to false, it will only count realized profit for daily loss/profit and will ignore floating profit/loss.
Perfected! I try and that ok. Problem resolved!
 

MrMaths

Newbie
Sep 1, 2024
7
0
2
45
[Suggestion] I actually have a real need for this. For the condition:

"Number of positions greater or equal"

May we please have the option to choose losing or profiting positions too.

So 'Number of losing/profit positions greater or equal'

These are open positions that are losing or profiting. So for usage example I have 6 open positions buys on USDCAD. They are all blue profiting. When two positions turns red losing, it exits all the USDCAD buys.

This allows us to keep our profits and limit losses when the trend reverses.

It could be that the script needs to check if a position is winning or losing, it could even do it at 1 min intervals, even 5 mins is fine.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
[Suggestion] I actually have a real need for this. For the condition:

"Number of positions greater or equal"

May we please have the option to choose losing or profiting positions too.

So 'Number of losing/profit positions greater or equal'

These are open positions that are losing or profiting. So for usage example I have 6 open positions buys on USDCAD. They are all blue profiting. When two positions turns red losing, it exits all the USDCAD buys.

This allows us to keep our profits and limit losses when the trend reverses.

It could be that the script needs to check if a position is winning or losing, it could even do it at 1 min intervals, even 5 mins is fine.
You should already be able to achieve that by using the Number of positions >= condition in combination with the Ignore profitable filter.
 
  • 👍
Reactions: MrMaths