Questions from Beginners MQL4 MT4 MetaTrader 4 - page 66

 
Thanks to all the guys who responded to my problem! I'm a bit stumped! I can't digest every help, I'm a total LOSER, I need time!
 
Vitalie Postolache:

No, it's a kind of advice on how to learn. People are so far able to acquire knowledge only through parallel study of theory with application in practice, there is no such thing or trinket that you push a button or swallow a pill and you know everything.

If you have zero knowledge in programming, you don't know any language, it is better to start with C++, there are so many tutorials, webinars and other courses on the Internet, that you can't listen to them all even 24/7. The main thing is the basics. Since MQL and C++ are very similar, the programming of algorithms for MT4 or 5 will also be easier.

You just need to start learning rather than whining.

I had such an idea about C++, thanks for the tip.
 
FOTOGRAF14:
I had such an idea about C++, thanks for the tip.

You should not confuse programming languages, otherwise it will be like in the proverb: "two birds with one stone...", "on two chairs...".

If you just need to code in mql, then learn mql.

In general, my good advice - start learning mql5, it has a future, otherwise you won't need it before you learn mql4.

 
I put the code in, just like you said, but where is it?
 
Vitalie Postolache:
If everything will work as intended, then yes. But there are always a few ways to both make a thing and mess it up ;)
Thanks for the tips. I have sorted out the lots and the functionality. Now I have to deal with stops and order opening conditions
 
Hello. Please advise how to prescribe in MQL4 code the rule of opening an order: there should be an order with a certain magic number in the market, and if there is no such order, the Expert Advisor will not open anything according to its main algorithm,
 
Hello!Could you tell me if you can - when installing an EA, which folder in MQL4 - the PDF file is installed in?!
 
Hello, I have found that I can not open a trading account in the terminal, the account is active, registered on the broker's website, but the terminal itself does not open, says no connection. I tried to reinstall the terminal has not helped, I copy the password and ip address of the server, (in general, the server I need is not in the list I have to add), demo account works fine, I do not know what to do next (
 
d1567:
Hello!Can you tell me if you can - when installing an EA, which MQL4 folder does the PDF file go in?!
The PDF is not installed. Most likely it's an instruction manual.
 

Good day to all good people ...

Below is the code of Trailing Stop function, who can explain the meaning ofOrderStopLoss()!=0 highlighted in the code, why it is applicable, in this case, only forOrderType()==1. ..?

...And another, more important question - how to write in this code the condition according to which only one of several open market orders meeting StopLoss requirements will be triggered? I.e. if we have two or more open orders of the same direction, only the one closest to the market price will be modified.

int TralFunck(int Ticket)

{

double TralPrice=0,Punkt=0;

chk=OrderSelect(Ticket,SELECT_BY_TICKET,MODE_TRADES);

if(OrderProfit()<=0)return(0);

if(OrderType()==0){Punkt=(Bid-OrderOpenPrice())/Point;TralPrice=NormalizeDouble((Bid-Tral*D*Point),Digits);}

if(OrderType()==1){Punkt=(OrderOpenPrice()-Ask)/Point;TralPrice=NormalizeDouble((Ask+Tral*D*Point),Digits);}

if(Punkt<MarketInfo(Symbol(),MODE_STOPLEVEL))return(0);

if(Punkt<(Tral+TP)*D)return(0);

if(OrderType()==0 && TralPrice<=NormalizeDouble(OrderStopLoss(),Digits))return(0);

if(OrderType()==1 && TralPrice>=NormalizeDouble(OrderStopLoss(),Digits) && OrderStopLoss()!=0)return(0);

ModifyOrder(OrderTicket(),OrderOpenPrice(),TralPrice,OrderTakeProfit());

return(0);

}

... Thanks in advance to all who responded for any response !!!