Questions from Beginners MQL5 MT5 MetaTrader 5 - page 908

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Please share, who knows and knows how to prohibit an EA from selling after a stop is triggered?
Good evening, forum users!
A dilemma has arisen.
I had a transaction and stored it in a variable
Some time later, an event occurred and I store the time in a variable
How can I check if 15 minutes have passed between these events?
Thought I had two variables now and now2 set in seconds, tried to take the difference and it should be more than 700 seconds
BUT it's not working((
I'm asking for help from the community!
Good evening, forum users!
A dilemma has arisen.
I had a transaction and I stored it in a variable
Some time later, an event occurred and I store the time in a variable
How can I check if 15 minutes have passed between these events?
Thought I had two variables now and now2 set in seconds, tried to take the difference and it should be more than 700 seconds
BUT it's not working((
Please help from the community!
The datetime variable is represented as date and time. You can solve the problem differently, for example to represent 700 (although 15 minutes is 900 seconds) in datetime type
or vice versa represent variables as int type
or like this
Anyway, we have to check...The datetime variable is represented as date and time. You can solve the problem in different ways, e.g. represent 700 (although 15 minutes is 900 seconds) as datetime
The evening is coming)))
The evening is making itself felt)))
Yeah... It took me an hour and a half to connect the function from the inluder...
Connect the standard trading classCTrade
(it comes standard with the terminal)
and call two methods:
SetTypeFillingBySymbol
Sets the order type according to the specified symbol
SetMarginMode
Sets the margin calculation mode according to the current account settings
Vladimir, good evening, could you please advise me please make a function that calculates the percentage profit I want to calculate the traded volume but I can't get it right, I think I need to identify the order with the direction out and use them to calculate the volume
by the way, the number of closed positions is also a problem to find out how many of them have tradedVladimir, good evening, could you please advise me on how to do a function that calculates the percentage of profit I want to calculate the traded volume and it does not work correctly I think I need to identify the order with the direction out and with them to calculate the volume
I do not understand anything, all the letters are piled up. Pass your code through the code styler.
Vladimir, good evening, could you suggest a function that calculates profit percent, I want to calculate the traded volume and it does not work correctly, I think I need to identify the order with the direction out and with them to calculate the volume.
by the way, it is also a problem with the number of closed positionsPlease send the code correctly. I have already corrected you once and put the code correctly.
Vladimir, good evening, could you suggest a function that calculates profit percent, I want to calculate the traded volume and it does not work correctly, I think I need to identify the order with the direction out and with them to calculate the volume.
by the way, the number of closed positions is also a problemI have submitted your code correctly for the third time. I wonder how many more tries we have to try. :)