Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 774

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
Can you tell me how to replace it in MQL5 ?
And then read the contents of the structure. It works the same in mql5 and in mql4
this article will help youhttps://www.mql5.com/ru/articles/81
Thank you.
Due to the limitation on the number of open positions at the broker, I had to split the portfolio into 2 accounts in order to open the whole portfolio. Could you please advise me how to organise a trawl of the aggregate position of the two accounts?
Thank you in advance.
Please advise a beginner... i downloaded the free indicator.... from Market... when i switch from one time period to another, the indicator is displayed with a big delay (i.e. it slows down)... what could be the problem? Thanks...
Too much data to calculate, or the indicator is not written optimally. It happens.
How to write a function that would cause the robot to roll over in case of a loss. For example has gone in minus 20 points and flipped and again in minus again flips. Please, help me.
You close a position as soon as it reaches -something and immediately open it in the opposite direction from the closed one.
0 You take all orders (OrdersTotal), look through them (OrderSelect), in order to see, if there is already an open position in this TS
1.1 If there is already an open position, note the order ticket (OrderTicket)
1.2 If not - you open a position (OrderSend), save the ticket of this position into a variable, set take and stop points if needed (OrderModify)
2 Check the current profit (difference between OrderOpenPrice and Bid or Ask), until one of the following conditions is met
2.1 If the profit has reached the set loss - close the position (OrderClose) and open a new one in the other direction, remember the ticket, then continue with point 2
2.2 If the profit reaches the required value, close the position, reset the ticket, open a new position by the rules of entering TS, save the ticket of this position in the variable, and go to point 2
https://docs.mql4.com/ru/trading
You close the position as soon as it goes to -something and immediately open it in the opposite direction from the closed position.
0 You take all orders (OrdersTotal), look through them (OrderSelect), to see if there is already an open position for this TS
1.1 If there is already an open position, note the order ticket (OrderTicket)
1.2 If not - you open a position (OrderSend), save the ticket of this position into a variable, set take and stop points if needed (OrderModify)
2 Check the current profit (difference between OrderOpenPrice and Bid or Ask), until one of the following conditions is met
2.1 If the profit has reached the set loss - close the position (OrderClose) and open a new one in the other direction, memorize the ticket, continue with point 2
2.2 If the profit reaches the required value, close the position, reset the ticket, open a new position by the rules of entering TS, save the ticket of this position in the variable, and go to point 2
https://docs.mql4.com/ru/trading
Thank you.
Greetings. Could you give me a hint?
How does the condition hold when a variable with a negative value(summ)>= a variable(profit) equal to zero?
Whole code,
Greetings. Could you give me a hint?
How does the condition hold when a variable with a negative value(summ)>= a variable(profit) equal to zero?
Whole code,