You are correct to return values from non- void functions, but it is better to switch to new rails - there is nothing complicated there.
Write, do not forget to insert #property strict directive at the very beginning of the code - where all directives are written, read error codes - their descriptions are in the documentation and everything will be fine and not complicated.
Where can I find the error codes? Where is this documentation?
I am mastering emq-el by Sergei Kovalev's tutorial.
I downloaded the Expert Advisor from there, compiled it, it even seems to work, but when compiling it displays some comments, not errors, but warnings.
What should I change to make it compile without any errors? Thank you in advance.
MetaQuotes Language 4 (MQL4) - встроенный язык программирования торговых стратегий, разработанный компанией MetaQuotes Software Corp. на основе своего многолетнего опыта в создании торгово-информационных платформ. Этот язык позволяет писать собственные программы-эксперты (Expert Advisors), автоматизирующие управление торговыми процессами и...
Artyom, is the mql5 documentation there? and the questions are in the mql4 section
There is a documentation on mql4. And it is better to press F1 while in the MetaEditor
Ahh... Well all the same - it's not so complicated either - it's faster to put your finger on F1 and find everything you need than to wait 24 hours for an answer on the forum. I don't understand ...
Hello, I'm new to programming. I haven't found any ready-made code anywhere. The idea is the following - I need to control a custom indicator from an EA, or rather change its external parameters (one) when some event happens. The logic in brief - if the lot (or for example the number of positions) > a predefined value, the external setting in the indicator (which is in another window and is not connected with this EA) changes on the fly without re-initialization of the indicator. Maybe you can try to do it through
string ServiceCustomIndicatorByIndexA(int nIndex);// я даже не знаю тут ANSI или UNICODE нужно
и
int ServiceGetNamesIndicatorsMA(int hwndChart,int nWindow,string &asIndicators[],int nSize);
I do not know how to do it, may any programmer write a simple code block for an example. c/o Denis
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.
Quicker to figure out and understand
write down the prices, how to take them afterwards, when what?
to insert in this loop instead of rHello, I have made a function which should increase the stop loss after the last order has closed in minus.
Increases it by the set step, until it reaches the maximum. As a result, it always sets the original value of stop loss.
What is wrong? Thank you!
//+------------------------------------------------------------------+
double SL()
{
double sL;
if(OrdersHistoryTotal()==0)
{
sL=StopLoss;
}
if(OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY))
{
if(OrderProfit()>=0)
{
sL=StopLoss;
}
if(OrderProfit()<0 && OrderType()==OP_BUY)
{
sL=OrderOpenPrice()-OrderStopLoss()+SLStep;
}
if(OrderProfit()<0 && OrderType()==OP_SELL)
{
sL=OrderStopLoss()-OrderOpenPrice()+SLStep;
}
}
if(sL>maxStep)
{
sL=StopLoss;
}
return(sL);
}
//+------------------------------------------------------------------+
What am I writing it wrong?
It should go like this http://prntscr.com/lu1kb9
Tried to insert the data under the current template
But it's still not the same. help meGood afternoon.
I am mastering emq-el by Sergei Kovalev's tutorial.
I downloaded the Expert Advisor from there, compiled it, it even seems to work, but when compiling it displays some comments, not errors, but warnings.
What should I change to make it compile without any errors? Thank you in advance.
Where can I find the error codes? Where is this documentation?
In the menu of this website - look up
In the menu of this site - look up
Artem, there is documentation on mql5, and the questions are in the mql4 section
Sergey Branin:
Where can I find the error codes? Where is this documentation?
Here is mql4 documentation. You may also press F1 in MetaEditor
Artyom, is the mql5 documentation there? and the questions are in the mql4 section
There is a documentation on mql4. And it is better to press F1 while in the MetaEditor
Ahh... Well all the same - it's not so complicated either - it's faster to put your finger on F1 and find everything you need than to wait 24 hours for an answer on the forum. I don't understand ...
I do not know how to do it, may any programmer write a simple code block for an example. c/o Denis