vaughn

Newbie
Sep 28, 2021
9
0
2
38
hi, is it possible to make DoNotResetTimer ?

so this is the scenario, if the condition meet then it will disable auto trading, but will starting on 01.00 server time
it just like auto trading scheduller with condition
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,619
1,366
144
Odesa
www.earnforex.com
hi, is it possible to make DoNotResetTimer ?

so this is the scenario, if the condition meet then it will disable auto trading, but will starting on 01.00 server time
it just like auto trading scheduller with condition
But it would also need a different action for that timer. Did you consider using a separate instance of AP or better of AutoTrading Scheduler which would enable autotrading at 01:00?
 

vaughn

Newbie
Sep 28, 2021
9
0
2
38
But it would also need a different action for that timer. Did you consider using a separate instance of AP or better of AutoTrading Scheduler which would enable autotrading at 01:00?

yes, so I will load 2 differents AP
First one only do timer with enabling auto trading on 01.00
Second one will disabling auto trading if meet my condition

the problem is that the first AP timer will reset if it executed
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,619
1,366
144
Odesa
www.earnforex.com
yes, so I will load 2 differents AP
First one only do timer with enabling auto trading on 01.00
Second one will disabling auto trading if meet my condition

the problem is that the first AP timer will reset if it executed
Oh, I see. I will consider adding an input parameter for not to reset the timer, but I guess the AutoTrading Scheduler should work in your case.
 

vaughn

Newbie
Sep 28, 2021
9
0
2
38
Oh, I see. I will consider adding an input parameter for not to reset the timer, but I guess the AutoTrading Scheduler should work in your case.

actually for autotrading scheduler little bit not ok for me, didnt find a correct set for it

for example if I used AP and my condition is meet and AP disable autotrading but it will be enabled again by AT if its still on AT time range
and also if I used AP and my condition is not meet and its not on AT time range then it will disabled by AT

AutoTrading Schedule logic is checking time that on it set right ? if its not then AT will disabled autotrading
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,619
1,366
144
Odesa
www.earnforex.com
actually for autotrading scheduler little bit not ok for me, didnt find a correct set for it

for example if I used AP and my condition is meet and AP disable autotrading but it will be enabled again by AT if its still on AT time range
and also if I used AP and my condition is not meet and its not on AT time range then it will disabled by AT

AutoTrading Schedule logic is checking time that on it set right ? if its not then AT will disabled autotrading
I see. No, the Scheduler won't help you here. The problem with making Timer checkbox non-resetting is that it will keep triggering as the time (in hours + minutes) won't change fast.
 

vaughn

Newbie
Sep 28, 2021
9
0
2
38
I see. No, the Scheduler won't help you here. The problem with making Timer checkbox non-resetting is that it will keep triggering as the time (in hours + minutes) won't change fast.

ah ok noted,
it seem I will try to make an indicator/ea for my purpose
 

EnrichWave

Master Trader
May 15, 2018
327
82
74
India
Dear @Enivid Could you please add a feature to Close all positions (include/exclude pending) while the MT4 server time at specific time?

Regards

PS: if there is already EA available to close all order at specific time, please let me know.
 
Last edited:

Enivid

Administrator
Staff member
Nov 30, 2008
18,619
1,366
144
Odesa
www.earnforex.com
Dear @Enivid Could you please add a feature to Close all positions (include/exclude pending) while the MT4 server time at specific time?

Regards

PS: if there is already EA available to close all order at specific time, please let me know.
Account Protector can already do this.
 

Artattack

Trader
Feb 5, 2021
14
2
14
65
Hi Envid.
Thank you again for this wonderful EA.
Equity trailing stop. I understand that it is independent of recapture snapshots. I wonder if it is possible in a future upgrade to allow a recapture of equity trailing stop setting.
What I am currently doing is setting a trailing stop value this then triggers actions to close all trades, recapture snapshots.
What I would like it to do is close all trades, recapture snapshots and recapture the equity trailing stop value and keeps the setting of ON.
At the moment it keeps the value but unchecks the box once triggered.

Thank you for your time.
Yours Arthur.
 

Artattack

Trader
Feb 5, 2021
14
2
14
65
@Artattack So, you want equity trailing stop checkbox to remain ticked after the trailing stop is triggered?
Hi Enivid.
Sorry for the late reply, I did not get a notification of your response.
Yes if that option is possible.
What I wish to do is when it is triggered with a win or loss
  1. All trades will be closed. (it does this already)
  2. Snapshots recaptured including the value for the equity trailing stop. (it does this already)
  3. The equity trailing stop checkbox remains ticked. (option currently unavailable)
Then my usual EA starts to place new trades and we go through the cycle again.

I am also having an issue with account protector recapturing snapshots but not triggering a close of all trades.
I will make a separate post about that.
 

Artattack

Trader
Feb 5, 2021
14
2
14
65
Hi Enivid.
In my last post I said that I was having an issue with Account Protector not triggering correctly. I have this running on Demo account.
If you look at the time and in the following photo the profit status.
Actions set are CLOSE 100% OF ALL TRADES and RECAPTURE SNAPSHOTS
NOTE AUTO TRADING IS DISABLED AT THIS TIME. (the status of Account Protector does not reflect this it normally says auto trading disabled)
account protector 11-31-25 chart 1.jpg
This image is the current profit total equity you can see that it was triggered to a new equity of 4043.22 Balance 4046.17 at the time of the photo.
account protector 11-31-25 chart 1 profit state.jpg
On another chart I also have account protector running and this disables auto trading if floating loss rises to 1 point. Basically what I am trying to do here is just allow one trade to open. it immediately goes into to loss and disables auto trading just what I expect it to do. While in a negative points state this Account Protector on the second chart disables auto trading every 1 second.

This next image shows the issue.
A new equity total of 4046.47 (Balance remains at 4046.17) has been set but the trade did not close as instructed by CLOSE 100% of all trades.

Snapshots were recaptured

Account Protector with new snapshot 11-55-11.jpg

This image shows current equity total.
The balance has not changed because Account Protector did not close all trades when it was triggered.
NOTE AUTO TRADING IS STILL DISABLED

Account Protector with current equity.jpg

Could it be due to 2 copies of account protector running?
I do have Account protector running on a chart XAUUSD and I have it running on a second XAUUSD (the same pair I have just realised). Could that be causing a conflict and Account Protector should be on separate pairs?
At one time I also had a 3rd Account Protector running that it enabled auto trading when floating profit rises to 1 point but that has been removed.
It also was running a separate chart but still XAUUSD.
Regretfully I don't have the log file because I have not enabled it.
Arthur.
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,619
1,366
144
Odesa
www.earnforex.com
Hi Enivid.
In my last post I said that I was having an issue with Account Protector not triggering correctly. I have this running on Demo account.
If you look at the time and in the following photo the profit status.
Actions set are CLOSE 100% OF ALL TRADES and RECAPTURE SNAPSHOTS
NOTE AUTO TRADING IS DISABLED AT THIS TIME. (the status of Account Protector does not reflect this it normally says auto trading disabled)
View attachment 21649
This image is the current profit total equity you can see that it was triggered to a new equity of 4043.22 Balance 4046.17 at the time of the photo.
View attachment 21650
On another chart I also have account protector running and this disables auto trading if floating loss rises to 1 point. Basically what I am trying to do here is just allow one trade to open. it immediately goes into to loss and disables auto trading just what I expect it to do. While in a negative points state this Account Protector on the second chart disables auto trading every 1 second.

This next image shows the issue.
A new equity total of 4046.47 (Balance remains at 4046.17) has been set but the trade did not close as instructed by CLOSE 100% of all trades.

Snapshots were recaptured

View attachment 21651

This image shows current equity total.
The balance has not changed because Account Protector did not close all trades when it was triggered.
NOTE AUTO TRADING IS STILL DISABLED

View attachment 21652

Could it be due to 2 copies of account protector running?
I do have Account protector running on a chart XAUUSD and I have it running on a second XAUUSD (the same pair I have just realised). Could that be causing a conflict and Account Protector should be on separate pairs?
At one time I also had a 3rd Account Protector running that it enabled auto trading when floating profit rises to 1 point but that has been removed.
It also was running a separate chart but still XAUUSD.
Regretfully I don't have the log file because I have not enabled it.
Arthur.
Do you still have the log output in the Experts tab?
 

Artattack

Trader
Feb 5, 2021
14
2
14
65
Hi Enivid.
Yes please find attached.

Before you do any work on it Enivid, let me see if putting the 2nd Account protector on a different currency pair solves the problem.
It may take a while for a trade to open and get into profit before I can get back to you.

Here also are some snippets of the times involved. Close positions did not happen.
I am not using magic numbers or any filters just Do not filter by trading instrument.

I am trading another demo using similar settings except Equity 100.12% condition
This also has auto trading disabled (as it should be due to the 2nd Account Protector)
This also is not closing trades but still takes the snapshots and the 1st account protector that has the Equity 100.12% condition does not say that autotrading is disabled.
This may be helpful. If I tick or untick any box on the 1st Account Protector then the Status does change to Autotrading Disabled but it does not register in the experts log.


0 11:31:24.210 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:31:24.210 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:31:24.601 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:31:24.601 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:31:25.148 Account Protector XAUUSD,M15: CONDITION IS MET: Equity rose to 100.08% of previous snapshot (4039.94 GBP)
0 11:31:25.148 Account Protector XAUUSD,M15: ACTION IS TAKEN: Close positions (100.00% of All).
0 11:31:25.148 Account Protector XAUUSD,M15: ACTION IS TAKEN: Recapture snapshots.
0 11:31:25.148 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:31:25.148 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:31:25.617 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:31:25.617 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.


11:54:59.917 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:55:00.230 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:55:00.230 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:55:00.324 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:55:00.324 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:55:11.229 Account Protector XAUUSD,M15: CONDITION IS MET: Equity rose to 100.08% of previous snapshot (4043.22 GBP)
0 11:55:11.229 Account Protector XAUUSD,M15: ACTION IS TAKEN: Close positions (100.00% of All).
0 11:55:11.229 Account Protector XAUUSD,M15: ACTION IS TAKEN: Recapture snapshots.
0 11:55:29.494 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:55:29.494 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:55:29.682 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:55:29.682 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:55:29.963 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 11:55:29.963 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 11:55:30.322 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points



Here I restarted MT4 and a new trade opened after I had manually enabled auto trading.
13:55:30.704 Account Protector XAUUSD,M15: Alert: AutoTrading is disabled! EA will be not able to perform trading operations!
0 13:55:30.720 Account Protector XAUUSD,M15: initialized
0 13:55:30.720 Account Protector XAUUSD,M15: Alert: AutoTrading is disabled! EA will be not able to perform trading operations!
0 13:55:30.735 Account Protector XAUUSD,M15: initialized
0 13:55:52.578 Automated trading enabled
0 13:55:54.906 Automated trading disabled
0 13:55:56.734 Automated trading enabled
0 13:56:27.124 Automated trading disabled
0 13:56:28.718 Automated trading enabled
2 14:30:00.487 Rossbot_updated_input_order AUDCAD,M15: open #77251796 buy 0.04 AUDCAD at 0.90112 ok
0 14:30:00.487 Rossbot_updated_input_order AUDCAD,M15: Alert: Long trade #77251796 has been opened at 0.90112, hoiurly update AUDCAD M15
0 14:30:03.378 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 14:30:03.378 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 14:30:03.378 Automated trading disabled
0 14:30:03.456 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 14:30:03.456 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 14:30:20.652 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 14:30:20.652 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
0 14:30:20.746 Account Protector XAUUSD,M15: CONDITION IS MET: Floating loss rose to 1 points
0 14:30:20.746 Account Protector XAUUSD,M15: ACTION IS TAKEN: Disable autotrading.
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,619
1,366
144
Odesa
www.earnforex.com
Before you do any work on it Enivid, let me see if putting the 2nd Account protector on a different currency pair solves the problem.
It may take a while for a trade to open and get into profit before I can get back to you.
Could it be that your other AP disables autotrading just when the first AP tries to close the trades? It won't be able to do it if autotrading is disabled by another AP.