![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
By the way, even on one pair, any slightly profitable Expert Advisor becomes much more profitable if you add to it the condition when the chart of the traded instrument is below all others, then buy and sell when it is above all others...
You, Slava, are beginning to get the hang of it
The optimal system for now I suggest the following: an equity trail is inserted in the Expert Advisor and 2 coefficients on the 2nd pair's lot are entered... for sell and for buy... These coefficients do not have to be calculated programmatically...
double MG=AccountFreeMargin(), Min_Lot = MarketInfo(Symb, MODE_MINLOT),Lots;
if(margin>0)
{
int m=MG/MarketInfo(Symb, MODE_MARGINREQUIRED)*margin/Min_Lot;
Lots = m*Min_Lot;
if(Lots < Min_Lot)
Lots =Min_Lot;
if(Lots > MarketInfo (Symb, MODE_MAXLOT))
Lots = MarketInfo (Symb, MODE_MAXLOT);
}
if(margin==0)
Lots = Lots;
LotsParaB = KB*Lots;
LotsParaS = KS*Lots;
//..........................................................................................
//........................................................................................
double MG=AccountFreeMargin(), Min_Lot = MarketInfo(Symb, MODE_MINLOT),Lots;
if(margin>0)
{
int m=MG/MarketInfo(Symb, MODE_MARGINREQUIRED)*margin/Min_Lot;
Lots = m*Min_Lot;
if(Lots < Min_Lot)
Lots =Min_Lot;
if(Lots > MarketInfo (Symb, MODE_MAXLOT))
Lots = MarketInfo (Symb, MODE_MAXLOT);
}
if(margin==0)
Lots = Lots;
LotsParaB = KB*Lots;
LotsParaS = KS*Lots;
//..........................................................................................
I've always been against trawls. This needs a better idea. Come on - when you get to the bottom of the market. Well I'll finish right away if anyone can guess my riddle.
We won't push one pair over the other. There is a simpler solution. An open trade will close in the open position in any case, if it is opened according to the market laws. Now, whether to open the second one or not, that is the question.
You can manage the volatility, but this will not always succeed.
>>>I've always been against trawling
Why? You can and should trawl :) if you're in a trend, you can stay in a position for days (or weeks).
I've always been against trawls. You need a better idea. Come on - when you get to the bottom of the market. Well I'll write right away if anyone can guess my riddle.
It's up to you whether to include it or not... At least put in the closing condition that the equity is greater than the balance, I think it's necessary.
AccountBalance()<AccountEquity()>>>I've always been against trawling
Why? you can and should trawl :) if you get into a trend, you can stay in it for a few days (or weeks).
>>>I always been against trawls. The trend is never straight line. So you can open today and only close in a year's time, missing out on additional profits.
whether or not it's up to you to include it... At the very least, it should be included in the closing condition that equity is higher than the balance.
AccountBalance()<AccountEquity()Ok. I think for my grail - what we have already written is enough. The rest of the analysis has already been done by me a long time ago. And there's not a single version of this analysis, though it's all described by Alexander through indicators. The indicators quite clearly illustrate the picture of what is happening. All that remains is to think and write a really worthwhile algorithm (not based on these indicators) for market behavior processing. There will definitely be no indicators left.
Guys, I'm sorry, I'm a little out of shape... I traded both on this model and on the indicator, both manually and using an Expert Advisor with the right algorithm, and the result was the same - I lost money.
I understand Slava - he's searching, looking, trying
I understand Newrain - he has mental problems...
I understand Aleksander - he saw a picture of corrected currency instruments and told me the idea.