- Questions from Beginners MQL5 MT5 MetaTrader 5
- Please help me in some code
- I will write a free mql4 advisor
You have only four choices:
- Search for it,
- learn to code it, (you couldn't be bothered to learn MQL4/5, therefor there is no common language for us to communicate,)
- Beg at Coding help - MQL4 and MetaTrader 4 - MQL4 programming forum or Need help with coding - General - MQL5 programming forum or Free MQL4 To MQL5 Converter - General - MQL5 programming forum or Requests & Ideas (MQL5 only!),
- or pay (Freelance) someone to code it.
Help you with what? You haven't stated a problem.
You have only four choices:
- Search for it,
- learn to code it, (you couldn't be bothered to learn MQL4/5, therefor there is no common language for us to communicate,)
- Beg at Coding help - MQL4 and MetaTrader 4 - MQL4 programming forum or Need help with coding - General - MQL5 programming forum or Free MQL4 To MQL5 Converter - General - MQL5 programming forum or Requests & Ideas (MQL5 only!),
- or pay (Freelance) someone to code it.
Thank you very much.
I'm programming a robot. If the last command in the hole history, the following command will double. If that order returns, it will return to the initial value. Code in the MQL4
Yes.
if(OrderProfit()<0 { // Loss } if(OrderProfit()>0) { // Profit }
Yes.
Thank u very much....!
if(OrderSelect(OrderTicket(),SELECT_BY_TICKET,MODE_HISTORY))
{
Print("Profit of the last transaction in the history = "+OrderProfit());
}
else
{
Print("Not..................!");
}
But it not show for me.
if(OrderSelect(OrderTicket(),SELECT_BY_TICKET,MODE_HISTORY))
This doesn't make sense unless you are re-selecting an order for some reason.
When selecting an order by ticket number, MODE_HISTORY and MODE_TRADES are ignored. ie if the above trade is an open order it will still be selected even if you have specified MODE_HISTORY.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use