I asked you a question, rewrote the indicator, added alerts to the task, but there was no response from you and I did not post the file. If I asked you a question, it means that it is important for me to know the answer.
I deeply apologize if I was offended, I feel a little embarrassed. I really didn't understand the question and you didn't make it clear, it seemed to be a bit funny, don't take it personally. The indicator itself displayed and worked fine, I just wanted to have a difference in sounds, for each parameter a different signal for better understanding. Otherwise, the indicator worked fine.
Hi all. We need to limit the number of open buy and sell orders during the day. Maximum 3 buys and 3 sells. The given piece of code limits the number of orders (no more than 3 are opened), but it comes out without dividing into buy and sell. How do I enter this split?
double LongTrades, ShortTrades;
int trades_total=OrdersHistoryTotal();
int type=OrderType();
for(int T=0; T<trades_total; T++)
{
if(OrderSelect(T,SELECT_BY_POS,MODE_HISTORY))
{
if (OrderMagicNumber()==Number)
{
if(type==OP_BUY)
{
if((TimeDayOfYear(OrderOpenTime())==TimeDayOfYear(TimeCurrent())) &&(TimeYear(OrderOpenTime())==TimeYear(TimeCurrent()))) LongTrades++;
}
if(type==OP_SELL)
{
if((TimeDayOfYear(OrderOpenTime())==TimeDayOfYear(TimeCurrent())) &&(TimeYear(OrderOpenTime())==TimeYear(TimeCurrent()))) ShortTrades++;
}
}
}
}
if (LongTrades<3)
if (ShortTrades<3)
Hi all. We need to limit the number of open buy and sell orders during the day. Maximum 3 buys and 3 sells. The given piece of code limits the number of orders (no more than 3 are opened), but it comes out without dividing into buy and sell. How should we implement this division?
Put the type inside the select
double LongTrades, ShortTrades;
int trades_total=OrdersHistoryTotal();
for(int T=0; T<trades_total; T++)
{
if(OrderSelect(T,SELECT_BY_POS,MODE_HISTORY))
{
int type=OrderType();
if (OrderMagicNumber()==Number)
{
if(type==OP_BUY)
{
if((TimeDayOfYear(OrderOpenTime())==TimeDayOfYear(TimeCurrent())) &&(TimeYear(OrderOpenTime())==TimeYear(TimeCurrent()))) LongTrades++;
}
if(type==OP_SELL)
{
if((TimeDayOfYear(OrderOpenTime())==TimeDayOfYear(TimeCurrent())) &&(TimeYear(OrderOpenTime())==TimeYear(TimeCurrent()))) ShortTrades++;
}
}
}
}
if (LongTrades<3)
if (ShortTrades<3)
It's got "Put a screenshot in your pocket". You click and then paste it into your post from your pocket - there's a little green pocket in the post editor menu.
There's "Put a screenshot in your pocket". You click and then paste it into your post from your pocket - there's a little green pocket in the post editor menu.
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.
I asked you a question, rewrote the indicator, added alerts to the task, but there was no response from you and I did not post the file. If I asked you a question, it means that it is important for me to know the answer.
I deeply apologize if I was offended, I feel a little embarrassed. I really didn't understand the question and you didn't make it clear, it seemed to be a bit funny, don't take it personally. The indicator itself displayed and worked fine, I just wanted to have a difference in sounds, for each parameter a different signal for better understanding. Otherwise, the indicator worked fine.
Hi all. We need to limit the number of open buy and sell orders during the day. Maximum 3 buys and 3 sells. The given piece of code limits the number of orders (no more than 3 are opened), but it comes out without dividing into buy and sell. How do I enter this split?
Hi all. We need to limit the number of open buy and sell orders during the day. Maximum 3 buys and 3 sells. The given piece of code limits the number of orders (no more than 3 are opened), but it comes out without dividing into buy and sell. How should we implement this division?
Put the type inside the select
has anyone done a recognition implementation of this?
https://www.mql5.com/ru/charts/8333244/audcad-h4-ifcmarkets-corp
has anyone done an implementation of this recognition thing?
https://www.mql5.com/ru/charts/8333244/audcad-h4-ifcmarkets-corp
Have you seen where your link goes?
It's got "Put a screenshot in your pocket". You click and then paste it into your post from your pocket - there's a little green pocket in the post editor menu.
in mt4 the ticket asks to convert to INT, it cannot be more than 2,147,483,647 ?
int - Целый тип int имеет размер 4 байта (32 бита). Минимальное значение -2 147 483 648, максимальное значение 2 147 483 647
Have you seen where your link goes?
There's "Put a screenshot in your pocket". You click and then paste it into your post from your pocket - there's a little green pocket in the post editor menu.
What's wrong with this link?
what's wrong with this link?
Should I record a video? Or will you try to follow it yourself?
Should I record a video? Or will you try to go through it yourself?
Yeah, record it, because I can't figure out what they want me to do here.