Questions from Beginners MQL5 MT5 MetaTrader 5 - page 802

 
lil_lil:

It is not clear how to know when the last position was closed in order to compare it with the current one.


First of all, you need to know which terminal this is for.
 
lil_lil:

It is unclear how to find out the last position closing time in order to compare it with the current time

Question about OnTradeTransaction function, example how to catch position closing.


 

Hello forum users! I would like to appeal to those who have experience of trading on the MOEX futures section. First of all, my past, slightly negative experience. I had a cent account in a well known forex brokerage company. Only 50 USD. But this account with 5000 cents-USD allowed me to test different strategies on CFDs (American stocks). Time frame was H1 and higher. And then one day either the Expert Advisor glitched (it was MT4) or I screwed up the code, it's not important now. But the Expert Advisor started opening and closing trades at crazy speed. And of course (within a few dozens of minutes) it ate all my account up to Margin Call on spread. But as they say, this is an experimental account - so it needs it.

And what if it's a real account with 500 Tb or more on MOEX? For me, for example, I would feel sorry for such a thoughtless loss. I traded only with hands on MOEX, now I want to trade robot on MT5.

But here is the question:

How to establish risk control on account level? Suppose 1% per day. I have not found such brokers. Of course, there are some good ideas such as RiskManager. But it is not that way. Such a robot will immediately close positions if it detects them. But spread and commission will do its evil deed.

Do you know if there is a function (I'm not familiar with MQL5) that blocks the account upon reaching certain percentages or values? If your not so sure which broker can help you with this, please let me know if there is any problem. If your not sure how to use this kind of service, then check with your broker who has the right brokerage skills and will take care of it. I will be very grateful for it.

 
DCodec:

Hello forum users! I am appealing to those who have experience of trading on the MOEX futures section. First of all, my past, slightly negative experience. I had a cent account at a well known forex brokerage company. Only 50 USD. But this account with 5000 cents-USD allowed me to test different strategies on CFDs (American stocks). Time frame was H1 and higher. And then one day either the Expert Advisor glitched (it was MT4) or I screwed up the code, it's not important now. But the Expert Advisor started opening and closing trades at crazy speed. And of course (within a few dozens of minutes) it ate all my account up to Margin Call on spread. But as they say, this is an experimental account - so it needs it.

And what if it's a real account with 500 Tb or more on MOEX? For me, for example, I would feel sorry for such a thoughtless loss. I traded only with hands on MOEX, now I want to trade robot on MT5.

But here is the question:

How to establish risk control on account level? Suppose 1% per day. I have not found such brokers. Of course, there are some good ideas such as RiskManager. But it is not that way. Such a robot will immediately close positions if it detects them. But the spread and commission will do its evil deed.

Do you know if there is a function (I'm not in MQL5) that blocks the account upon reaching a certain percent or value? If your not sure if there is a brokers who offer this kind of service in MOEX, not FOREX. If your not sure how to use this kind of service, then check with your broker who has the right brokerage skills and will take care of it. I will be very grateful for it.

Try out your robots in the tester / demo first, anyway!

Risk control may be different. Either on closed positions or on current ones, or something else. Look it up in the kodobase. I have not heard of brokers who offer such a service.

 
DCodec:

Hello forum users! I would like to appeal to those who have experience of trading on the MOEX futures section. First of all, my past, slightly negative experience. I had a cent account at a well known forex brokerage company. Only 50 USD. But this account with 5000 cents-USD allowed me to test different strategies on CFDs (American stocks). Time frame was H1 and higher. And then one day either the Expert Advisor glitched (it was MT4) or I screwed up the code, it's not important now. But the Expert Advisor started opening and closing trades at crazy speed. And of course (within a few dozens of minutes) it ate all my account up to Margin Call on spread. But as they say, this is an experimental account - so it needs it.

And what if it's a real account with 500 Tb or more on MOEX? For me, for example, I would feel sorry for such a thoughtless loss. I traded only with hands on MOEX, now I want to trade robot on MT5.

But here is the question:

How to establish risk control on account level? Suppose 1% per day. I have not found such brokers. Of course, there are some good ideas such as RiskManager. But it is not that way. Such a robot will immediately close positions if it detects them. But the spread and the commission will do its evil deed.

Do you know if there is a function (I'm not in MQL5) that blocks the account when a certain percent or value is reached? If there is a broker who offers this service on the MOEX, not FOREX. If your not sure how to use this kind of service, then check with your broker who has the right brokerage skills and will take care of it. I will be very grateful for it.


Your Expert Advisor is also a good choice if you want it to close your positions after a certain loss and disconnect from the chart or close the terminal.
 
DCodec:

Hello forum users! I am appealing to those who have experience of trading on the MOEX futures section. First of all, my past, slightly negative experience. I had a cent account at a well known forex brokerage company. Only 50 USD. But this account with 5000 cents-USD allowed me to test different strategies on CFDs (American stocks). Time frame was H1 and higher. And then one day either the Expert Advisor glitched (it was MT4) or I screwed up the code, it's not important now. But the Expert Advisor started opening and closing trades at crazy speed. And of course (within a few dozens of minutes) it ate all my account up to Margin Call on spread. But as they say, this is an experimental account - so it needs it.

And what if it's a real account with 500 Tb or more on MOEX? For me, for example, I would feel sorry for such a thoughtless loss. I traded only with hands on MOEX, now I want to trade robot on MT5.

But here is the question:

How to establish risk control on account level? Suppose 1% per day. I have not found such brokers. Of course, there are some good ideas such as RiskManager. But it is not that way. Such a robot will immediately close positions if it detects them. But the spread and commission will do its dirty work.

Do you know if there is a function (I'm not in MQL5) that blocks the account when something reaches a certain percentage or value? If your not so sure which broker can provide this service on MOEX, not FOREX. If your not sure how to use this kind of service, then check with your broker who has the right brokerage skills and will take care of it. I will be very grateful for it.

If you have any kind of robot (even from Market), it would make sense to monitor it with a special Expert Advisor/indicator and in case of any problems (providing conditions), kill it immediately by sending a message to messenger/SMS.


ZZY Radical variant - TerminalClose.

Expert
Expert
  • votes: 23
  • 2017.08.28
  • fxsaber
  • www.mql5.com
Все остальные файлы на данной странице описания библиотеки являются ее примерами/сценариями применения и не нужны для работы самой библиотеки. Возможности Примеры К описанию прикреплены примеры/сценарии ее использования. ExpertsRemove.mq5 ExpertsReopen.mq5 ChartsClose.mq5 ExpertLoader_Example.mq5 ExpertsChange_Example.mq5 Это...
 
Alexey Kozitsyn:

Test your robots first in the tester/demo anyway!

Risk control may be different. Either by closed positions or by current ones, or somehow. Look it up in the kodobase. I haven't heard of any brokers who offer such a service.

Yes, of course. In the tester. Demo is not the same.

Risk Control - that's what I'm talking about. Why is it that the "bourgeois" and their "offices" have such a service (although of course it does not come cheap? Therefore I am looking for an alternative. I understand that for a large company, the solution is simple - stupid settle "live" risk manager. And us - mortals (with a deposit up to 1 million) what to do? Share your experiences.

 
fxsaber:

Any robot (even from Market) should be monitored by another special advisor/indicator and in case of problems (prescribe a condition) kill it immediately by sending a message to messenger/SMS.


SZY The radical option - TerminalClose.

Interesting solutions. Of course, it turns out to be a robot tracking system. Which, of course, complicates the system, but calms my soul. I will try it. But I will search for simple solutions at the same time.

Thank you all very much.

 
DCodec:

Yes, of course. In the tester. That's not what a demo is about.

Risk control - that's what I'm talking about. Why is there such a service available abroad and in their "offices" (although of course it's not cheap? So I'm looking for an alternative. I understand that for a large company, the solution is simple - stupid settle "live" risk manager. And us - mortals (with a deposit up to 1 million) what to do? Share your experiences.

The easiest solution is to add (write) the required risk management module in your Expert Advisor. And make it work the way you want it to.
 
DCodec:

Interesting solutions. Of course it turns out to be a robot-tracking system for the robot. Which of course complicates the system, but is comforting to the soul. I'll give it a try. But I will look for simple solutions at the same time.

Thanks a lot everyone.

I have to make sure that not only the robot does not glitch, but also the exchange. For example, the exchange does not confuse bids with Ask. This has already happened more than once.
Reason: