granit77: The author does not know the essence of the result he is looking for. The author wants to see what happens :)) In simplified form it is a problem to express the numerical position of a point on the segment, where all distances are known. What is also known is that finding a point in the middle of the segment - the balance position, nothing happens. Closer to the upper boundary is a positive increment, closer to the lower boundary is a negative increment. As a hypothesis. And all variants are accepted. Even upside down.
Victor, you don't know anything!
If he wants to see what comes out of it, let him let me see how it went in :)
imho, everything else in the post I quoted is fiction, such as:
1. finding a point in the middle of the segment - the balance position
I am thinking about 1) verification of an open position and stop loss slippage, and 2) checking the stop loss in a real position.
I myself suggest 1) to check the open position for slippage of stop loss. If the value of floating balance is greater than stop loss, close it immediately.
2) Additional checking of stop loss and take profit setting.
3) Not to open positions at the weekend because of the appearing ticks.
What else needs to be added to the code, for a real EA?
ire9589: I am thinking about 1) verification of an open position and stop loss slippage, and 2) checking the stop loss in a real position.
I myself suggest 1) to check the open position for slippage of stop loss. If the value of float balance is greater than stop loss, close it immediately.
2) Additional checking of stop loss and take profit setting.
3) Not to open positions at the weekend because of the appearing ticks.
What else needs to be added to the code, for a real EA?
You do not need to add them to the code, but to the trading system. If it will work with the positive expected payoff, the question of what else should be added to the code will not arise - everything will be crystal clear.
Hello. Could you please tell me. What price to use for trading functions of other pairs ( not on the one the EA is attached to). I was thinking about iClose, I wondered. Are the Bid values stacked there, I guess?
nadya: Hello. Could you please tell me. What price to use for trading functions on other pairs ( not on the one the EA is attached to). I was thinking about iClose, I wondered. Are the Bid values stacked there, I guess?
double bid =MarketInfo("EURUSD",MODE_BID);
double ask =MarketInfo("EURUSD",MODE_ASK);
double point =MarketInfo("EURUSD",MODE_POINT);
int digits=MarketInfo("EURUSD",MODE_DIGITS);
int spread=MarketInfo("EURUSD",MODE_SPREAD);
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
The author does not know the essence of the result he is looking for. The author wants to see what happens :))
In simplified form it is a problem to express the numerical position of a point on the segment, where all distances are known. What is also known is that finding a point in the middle of the segment - the balance position, nothing happens. Closer to the upper boundary is a positive increment, closer to the lower boundary is a negative increment. As a hypothesis. And all variants are accepted. Even upside down.
Victor, you don't know anything!
If he wants to see what comes out of it, let him let me see how it went in :)
imho, everything else in the post I quoted is fiction, such as:
1. finding a point in the middle of the segment - the balance position
2. nearer to the upper limit - positive increment
3. closer to the lower boundary - negative.
4. any variants are acceptable
Variants of what?
Sort by value and select first/last... Although there is a less costly option of a direct search.
How are the values stored?
They appear gradually over the course of the day.
If there is an array of values, then:
Thank you!
I myself suggest 1) to check the open position for slippage of stop loss. If the value of floating balance is greater than stop loss, close it immediately.
2) Additional checking of stop loss and take profit setting.
3) Not to open positions at the weekend because of the appearing ticks.
What else needs to be added to the code, for a real EA?
They appear gradually over the course of the day.
If it is an array of timeseries, you can use https://docs.mql4.com/ru/series/iHighest.
Here's a simple function for me:
I want my function to return only the maximum value of "i", how do I do that?
I am thinking about 1) verification of an open position and stop loss slippage, and 2) checking the stop loss in a real position.
I myself suggest 1) to check the open position for slippage of stop loss. If the value of float balance is greater than stop loss, close it immediately.
2) Additional checking of stop loss and take profit setting.
3) Not to open positions at the weekend because of the appearing ticks.
What else needs to be added to the code, for a real EA?
You do not need to add them to the code, but to the trading system. If it will work with the positive expected payoff, the question of what else should be added to the code will not arise - everything will be crystal clear.
Hello. Could you please tell me. What price to use for trading functions on other pairs ( not on the one the EA is attached to). I was thinking about iClose, I wondered. Are the Bid values stacked there, I guess?
Thank you, it turned out to be quite simple)