Amazing. You have really covered everything in this tool. Thank you very much for providing it free to us. Much appreciated.AutoTrading doesn't need to be enabled for the AP to be able to enable AutoTrading on timer.
Amazing. You have really covered everything in this tool. Thank you very much for providing it free to us. Much appreciated.AutoTrading doesn't need to be enabled for the AP to be able to enable AutoTrading on timer.
Your MT5 is missing the standard MQL5 libraries. Try re-installing or copying them over from another MT5 installation. They should be in MQL5\Include\.hi there . Can you help me slove this problem ? . I cant complile file . I copy this folder ( account protect ) to MQL5/Expert then i compile file name : Account protect.mq5 but it seen errorView attachment 26840View attachment 26841
That's the setup problem. The action is logged because it actually attempts to take it because the condition is triggered (the daily profit is above the given value). As a sort of a band-aid fix, you could comment out the specific logging line in the code (Account Protector.mqh):Hello, thank you for such a great expert, it is truly impressive.
I do have a question about logging ( because it clutters the logs ) and specifically how to stop logging every second.
The setup is
1 AP is used to close all profits and disable the auto trading once the daily profit has been hit - works perfectly
2 AP is used to enable the auto trading once the timer is hit - works perfectly
Both AP have do not turn off the conditions/filters/actions etc.
The "issue", not a big deal, but it consistently logs ACTION IS TAKEN: Close positions (100.00% of All).
I could change the code and check on log action if the auto trading is disable, do not log anything, not sure if it is the best approach though.
So I was wondering if there is a better solution.
Thank you.
Logging("ACTION IS TAKEN: Close positions (" + DoubleToString(sets.doubleClosePercentage, 2) + "% of " + EnumToString(sets.CloseWhichPositions) + ").");
CONDITION IS MET:
messages, shouldn't you? Do you only get the ACTION IS TAKEN:
flood currently?I will probably change the Close action to check for the autotrading and only log the fact that it's disabled once and then start logging again when it's re-enabled. However, you should still be getting a flood of CONDITION IS MET: messages, shouldn't you? Do you only get the ACTION IS TAKEN: flood currently?
That's the setup problem. The action is logged because it actually attempts to take it because the condition is triggered (the daily profit is above the given value). As a sort of a band-aid fix, you could comment out the specific logging line in the code (Account Protector.mqh):
But for normal solution, there isn't much I could think of here. You could try using the equity snapshot conditions rather than daily profit/loss. If you set both APs to use global equity snapshots and set the second AP (the timer one) to recapture snapshots, it could work similarly to the daily profit/loss.MQL4:Logging("ACTION IS TAKEN: Close positions (" + DoubleToString(sets.doubleClosePercentage, 2) + "% of " + EnumToString(sets.CloseWhichPositions) + ").");
I will probably change the Close action to check for the autotrading and only log the fact that it's disabled once and then start logging again when it's re-enabled. However, you should still be getting a flood ofCONDITION IS MET:
messages, shouldn't you? Do you only get theACTION IS TAKEN:
flood currently?
2024.01.18 21:44:26.247 Account Protector (XAUUSD,H1) CONDITION IS MET: Daily profit/loss greater or equal to 1000.00 USD 2024.01.18 21:44:26.248 Account Protector (XAUUSD,H1) Account Equity = 104093.37 USD, Account Free Margin = 104093.37 USD, Account Balance = 104093.37 USD 2024.01.18 21:44:26.248 Account Protector (XAUUSD,H1) Floating profit (filtered) = 0.00 USD 2024.01.18 21:44:26.248 Account Protector (XAUUSD,H1) Number of open positions (filtered) = 0, Number of pending orders (filtered) = 0, Current spread = 0.18 2024.01.18 21:44:26.248 Account Protector (XAUUSD,H1) Current trading instrument Bid/Ask = 2023.14/2023.32 2024.01.18 21:44:26.271 Account Protector (XAUUSD,H1) ACTION IS TAKEN: Close positions (100.00% of All). 2024.01.18 21:44:26.271 Account Protector (XAUUSD,H1) AutoTrading disabled! 2024.01.18 21:44:26.271 Account Protector (XAUUSD,H1) ACTION IS TAKEN: Delete all pending orders. 2024.01.18 21:44:26.271 Account Protector (XAUUSD,H1) AutoTrading disabled! 2024.01.18 21:44:26.272 Account Protector (XAUUSD,H1) ACTION IS TAKEN: Disable autotrading. 2024.01.18 21:44:26.969 Account Protector (XAUUSD,H1) CONDITION IS MET: Daily profit/loss greater or equal to 1000.00 USD 2024.01.18 21:44:26.969 Account Protector (XAUUSD,H1) Account Equity = 104093.37 USD, Account Free Margin = 104093.37 USD, Account Balance = 104093.37 USD 2024.01.18 21:44:26.969 Account Protector (XAUUSD,H1) Floating profit (filtered) = 0.00 USD 2024.01.18 21:44:26.970 Account Protector (XAUUSD,H1) Number of open positions (filtered) = 0, Number of pending orders (filtered) = 0, Current spread = 0.16 2024.01.18 21:44:26.970 Account Protector (XAUUSD,H1) Current trading instrument Bid/Ask = 2023.14/2023.30 2024.01.18 21:44:27.003 Account Protector (XAUUSD,H1) ACTION IS TAKEN: Close positions (100.00% of All). 2024.01.18 21:44:27.004 Account Protector (XAUUSD,H1) AutoTrading disabled! 2024.01.18 21:44:27.004 Account Protector (XAUUSD,H1) ACTION IS TAKEN: Delete all pending orders. 2024.01.18 21:44:27.004 Account Protector (XAUUSD,H1) AutoTrading disabled! 2024.01.18 21:44:27.004 Account Protector (XAUUSD,H1) ACTION IS TAKEN: Disable autotrading. 2024.01.18 22:00:22.233 Account Protector (XAUUSD,H1) CONDITION IS MET: Daily profit/loss greater or equal to 1000.00 USD 2024.01.18 22:00:22.233 Account Protector (XAUUSD,H1) Account Equity = 104093.37 USD, Account Free Margin = 104093.37 USD, Account Balance = 104093.37 USD 2024.01.18 22:00:22.233 Account Protector (XAUUSD,H1) Floating profit (filtered) = 0.00 USD 2024.01.18 22:00:22.233 Account Protector (XAUUSD,H1) Number of open positions (filtered) = 0, Number of pending orders (filtered) = 0, Current spread = 0.39 2024.01.18 22:00:22.234 Account Protector (XAUUSD,H1) Current trading instrument Bid/Ask = 2022.88/2023.27 2024.01.18 22:00:22.263 Account Protector (XAUUSD,H1) ACTION IS TAKEN: Close positions (100.00% of All).
The issue with the flood is not the actions, but the condition. I will consider adding some more specific bypass to avoid the condition from triggering in such particular cases as yours. I will also add a parameter to turn off logging completely. However, this won't be released soon.Have the check that auto trading is enabled on all actions Except Enable Auto Trading ( which makes more sense to my case ).
Yes, agree. I will keep an eye on the releases, thank you regardless. It is quite a life saver for now.The issue with the flood is not the actions, but the condition. I will consider adding some more specific bypass to avoid the condition from triggering in such particular cases as yours. I will also add a parameter to turn off logging completely. However, this won't be released soon.
No, but you could just add two conditions - daily loss and equity decrease in % of snapshot - on the same AP.Hi, is there a setfile available for prop firm daily drawdown with a snapshot from equity or balance whichever is higher at the start of day?
Yes, you can do that.Would it be possible to run both EAs, the Positions Sizer for execute trades (1m/5m chart) e.g. NASDAQ (first chart) and use the Account Protector for cancel all orders, if max loss is reached on another 1H Chart of NASDAQ (2. chart)?
If you don't know how to compile, you don't need to do it. Just follow the installation steps by copying the Account Protector folder from the archive to MQL4\Experts\ of your data folder. Then restart MT4. It should appear under Experts in the Navigator of your MT4.Hi Guys, I'm trying to compile the mq4 file in metaeditor however I don't know how to compile it and save it. All I get is a mqh file. Is there perhaps anyone that could help out?
able for prop firm daily dra
I'll try that man, thanks!If you don't know how to compile, you don't need to do it. Just follow the installation steps by copying the Account Protector folder from the archive to MQL4\Experts\ of your data folder. Then restart MT4. It should appear under Experts in the Navigator of your MT4.
Usually that means one of the two things:Tried to compile the MT4 Version, can't o pen, with 101 errors and 9 warnings
You can do that with one instance of the EA. Your second condition should be Daily profit/loss <= currency units (-100).First of all, I want to congratulate you for an amazing piece of software!
I am a bit puzzled with the following scenario. If I want to have the following conditions running at the same time:
- Daily profit >= currency units: 100.00
- Daily loss >= currency units: -100.00
So whichever is met first, it will run my Actions.
Can I do it with one copy of the EA, or do I need to attach it to 2 charts? One for the profit and one for the loss?