check profit (period of time) is easiest, <place a trade, >close all trades . this will stop for the day if profit is reached, then continue the next
Posts made by jstap
-
RE: Accoun Balanceposted in General Discussions
-
RE: Buy only Sell only MT5posted in Questions & Answers
They are numeric, because although text is a string, it counts the tecx as a position (buy=0 sell=1, both=2) All I know is this compiled for me, it is tried and tested. Basically check if the enum text is what is selected in the inputs, if so activate blocks below, if not go through yellow and check the next. this https://fxdreema.com/shared/m27SSDMZd you can run on MT5 back test, and see that every time you change a input the drawn text will change.

-
RE: Buy only Sell only MT5posted in Questions & Answers
Set it up as an enum: https://fxdreema.com/shared/R8XxH6iSc
-
RE: 2 variables in 1 text outputposted in Questions & Answers
Something like this will do it, just replace words with the relevant ones:

-
RE: close all trades at the end of each month and start again next day!posted in Questions & Answers
Try once per bar set to month, the first tick of the month should activate all blocks beneath, then not again for a month.

-
RE: Check Distance Price Fractionposted in Questions & Answers
depends on traded asset and pip rules set in settings.
-
RE: گروه روبومستر سلیمانی خواهposted in Questions & Answers
I did see your other post but when indicators are use to determine SL it might not be why, if I was you I would run on live demo for a day, then the next I would backtest over the same time and see if results are different, then workout what it was that caused different results, this may show you what it is that is different.
-
RE: گروه روبومستر سلیمانی خواهposted in Questions & Answers
Check your Stop Loss normally it is because the live market reacts differently to backtest,. For me whenever SL is set correctly BT results are very similar to live results.
-
RE: 市价单(市场执行)只能在每个小时的 55–59 分钟内允许下单;挂单(所有类型)任何时间都允许下单与触发,不受该时间风控限制。posted in Questions & Answers
I can help you help yourself, start by testing and getting a few simple blocks working. no buy/sell trade/position - condition (doing anything) - buy/sell, make this in 2 trees (1 4 buys, 1 4 sells), back test and watch it how it works, then decide what you want to add/change.
-
RE: 市价单(市场执行)只能在每个小时的 55–59 分钟内允许下单;挂单(所有类型)任何时间都允许下单与触发,不受该时间风控限制。posted in Questions & Answers
You are lacking a lot of if this happens, make a start on your project and say what you cant do
-
RE: Where are comments printed now?posted in Questions & Answers
This compiles but does use Print(), not tested so give it a try. I will put everything you need below:

Settings:
LogToConsole(max_win, total);~next~
Global variables, includes:
double total = 0;
double max_win = 0;
int lastLogDay = -1;Custom function:
// Logs values to the Experts tab
void LogToConsole(double max_win, double total)
{
Print("Logging values → Max win: ", DoubleToString(max_win, 2),
", Total: ", DoubleToString(total, 2));
}
-
RE: Multitimeframe confirmationposted in Questions & Answers
This is down to our logic, if the bot is working as needed. Set up blocks that will obey your logic, and connect the orange dot to your buy/sell block. I you want to limit these add a diffract group number to blocks including a new buy/sell
-
RE: Multitimeframe confirmationposted in Questions & Answers
Yes, have you tested? This allow only 1 trade at a time, if you want 1 trade of a type change in the block...


-
RE: HOW TO PUT THE HH:MM IN A VARIABLE TO OPTIMIZE THE BEST WORKING TIME OF THE DAY?posted in Questions & Answers
Yes it converts the component time in int number format, to a string time stamp format
-
RE: Multitimeframe confirmationposted in Questions & Answers
I have said this before, you need a no trade block above your buy/sell blocks
-
RE: Multitimeframe confirmationposted in Questions & Answers
Then you need to start your tree with a no trade block
-
RE: Where are comments printed now?posted in Questions & Answers
Does this help? From Copilot (chatGPT)...
It sounds like your friend’s custom MT5 code used to reliably write to the log file via Print(), but after a recent update, the log location may have changed or the behavior of logging might have shifted slightly.
Here’s how to track down the new log file location and ensure the output is still being captured:
Where MT5 Stores Log Files Now
There are two main types of logs in MT5:- Platform Logs
- These are stored in:
...\MetaTrader 5\Logs\ - They capture general platform activity, including terminal startup, network events, and trade operations.
- Expert Logs (EA/Script Output like Print())
- These are stored in:
...\MetaTrader 5\MQL5\Logs\ - This is where your Print(cmt); output should appear.
To locate them: - Open MT5.
- Go to File → Open Data Folder.
- Navigate to:
- MQL5\Logs for EA/script logs.
- Logs for platform logs.
Each log file is named by date: YYYYMMDD.log.
️ If Nothing Is Showing Up
If your friend’s Print() output isn’t appearing: - Check the Experts tab in the MT5 terminal (bottom panel). If the EA is running, output should appear there live.
- Make sure the EA is attached and running—if it’s not triggered, no logs will be written.
- Confirm that logging is enabled in MT5 settings (some updates may reset preferences).
- If the EA is compiled in Release mode, some debug output might be suppressed. Try compiling in Debug mode.
If your friend wants to make the output more persistent or structured, I can help them write to a custom file using FileOpen() and FileWrite() instead of relying solely on Print(). Want to go that route?