[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1090
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
Help me create a simple code like this (if you can get a ready-made code right away):
if (Если есть открытый ордер на продажу по нашему фин. инструменту) //
{
Закрыть ордер; //
}
else
{
if (Если нет открытых ордеров на продажу по нашему фин. инструменту) //
{
Открыть ордер на покупку по нашему фин. инструменту; //
}
}
Help me create a simple code like this(if you can get a ready-made code right away):
if (Если есть открытый ордер на продажу по нашему фин. инструменту) //
{
Закрыть ордер; //
}
else
{
if (Если нет открытых ордеров на продажу по нашему фин. инструменту) //
{
Открыть ордер на покупку по нашему фин. инструменту; //
}
}
this is a topic for questions from those who want to understand and learn.
your topic is more suited to "freebies", "want" and other nonsense and misunderstandings
this is a topic for questions from those who want to understand and learn.
your topic is more suited to the topics of "freebies", "want" and other nonsense and misunderstandings
I am not denying that I am learning. If I wasn't, why would I be asking for help.
Wouldn't that work for you? Anywhere in the code can be inserted.
Help me create a simple code like this (if you can get a ready-made code right away):
if (Если есть открытый ордер на продажу по нашему фин. инструменту) //
{
Закрыть ордер; //
}
else
{
if (Если нет открытых ордеров на продажу по нашему фин. инструменту) //
{
Открыть ордер на покупку по нашему фин. инструменту; //
}
}
hello all
I am new to mts programming
I have a good Expert Advisor that makes 14 000 deposits
after that it starts to lose
I changed the maximum drawdown parameter to 14 000 and it does not lose 22 000
Thanks in advance.
It is not losing because it reaches a certain profit, just at that moment the market behavior changes and your Expert Advisor starts to make a mistake.
Watch the schedule of deals in this interval, analyze and add bypassing of such moments to the code.
There are interesting moments, for example, the EA behaves perfectly on one pair, and loses on the other, so after analysis it turns out that the signal to buy or sell on the successful pair, on this pair must simply invert. This is the trick that really works for me :)
Happy New Year!!!!!!!!!!!!!!!!!!!!
Sorry, I can't figure out the ObjectCreate function,
This is how ObjectCreate( string Verkhnyayastrelka, OBJ_ARROW, 0, Time[0], Verhnyayaghranytsa, ) writes an error;
Alert(" Verkhnyayastrelka " GetLastError() );
ObjectCreate( string Nizhnyayastrelka, OBJ_ARROW, 0, Time[0], Nyzhnyayaghranytsa, ) ;
Alert(" Nizhnyayastrelka " GetLastError() );
'OBJ_ARROW' - variable expected C:\Osenyaya sochi\experts\mom change.mq4 (117, 42)
***************************************8
So
ObjectCreate( Verkhnyayastrelka, OBJ_ARROW, 0, Time[0], Verhnyayaghranytsa, ) ;
Alert(" Verkhnyayastrelka " GetLastError() );
ObjectCreate( Nizhnyayastrelka, OBJ_ARROW, 0, Time[0], Nyzhnyayaghranytsa, ) ;
Alert(" Nizhnyayastrelka " GetLastError() );
'Verkhnyayastrelka' - variable not defined C:\Fall Sochi\experts\change.mq4 (117, 17)
'Nizhnyayastrelka' - variable not defined C:\Fall Sochi\experts\changing.mq4 (120, 16)
*************************************************************************************************
So, 'Nizhnyayastrelka', Nizhnyayastrelka;
ObjectCreate( Verkhnyayastrelka, OBJ_ARROW, 0, Time[0], Verhnyayaghranytsa, ) ;
Alert(" Verkhnyayastrelka " GetLastError() );
ObjectCreate( Nizhnyayastrelka, OBJ_ARROW, 0, Time[0], Nyzhnyayaghranytsa, ) ;
Alert(" Nizhnyayastrelka " GetLastError() );
')' - parameter expected C:\Osenyaya sochi\experts\mom change.mq4 (117, 79)
'''GetLastError'' - an operator expected C:\Autumnsoy/experts/whatever.mq4 (118, 28)
')' - parameter expected C:\Autumn soju\experts/whatever.mq4 (120, 77)
'GetLastError' - an operator expected C:\Autumn soju/experts/whatever.mq4 (121, 27)
Setver!!!!! works very badly When trying to insert text something works with the twenty-first attempt, then the balloon above the mouse arrow is spinning for a long time, and only after 2-5minutes I see it! Also about suddenly jumps up and down! And sends 3-6 minutes!!!
Help create such uncomplicated code (if you can get a ready-made code right away):
if (Если есть открытый ордер на продажу по нашему фин. инструменту) //
{
Закрыть ордер; //
}
else
{
if (Если нет открытых ордеров на продажу по нашему фин. инструменту) //
{
Открыть ордер на покупку по нашему фин. инструменту; //
}
}
Something about yours isn't working. Or is something wrong? Help me make the right one!
//+------------------------------------------------------------------+
int start()
{
int
magic,
SELL,
sells=0;
double
LOT,
StopLoss,
TakeProfit;
for (int i=0; i<OrdersTotal(); i++)
{
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true)
{
if (OrderSymbol() !=Symbol() || OrderMagicNumber() !=magic || OrderType() !=SELL ) continue;
OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Bid,Digits),3,White);
sells++;
}
}
if (sells==0) OrderSend(Symbol(),OP_BUY, LOT,NormalizeDouble(Ask,Digits),3,StopLoss,TakeProfit,"",magic,0,Green);
return(0);
}
//+------------------------------------------------------------------+