[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 952
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Somebody please help me, I just threw an EA and it's not working.
It should return the closing value of the last order if I have a stop loss, please tell me where I made a mistake.
A couple of pages ago I posted a procedure that searches the history for the last trade with the specified symbol and returns its profit. If you use this code as a base you can return not the profit of the last deal, but for example the opening or closing price of the last deal..... or any other data.
This is what I do, but since the orders are open, I use SELECT_BY_POS. Then if(Price<A)A=Price; if(Close[0]<A)Buy=true; but for some reason the second order opens at the price of the previous one.
Hi all prof traders
Can you advise how to start earning in forex?
Greetings!
A problem has arisen with determining the opening time of the week. The opening time of the first bar is Monday. I used the iTime function, but on a TF less than weekly it indicates the time of the last bar of the previous week (last bar of Friday). The interesting thing is that the iOpen function shows the correct opening value of the first bar of the week.
Here is the code
ObjectCreate("openw1",OBJ_TREND,0,0,0);
ObjectSet("openw1",OBJPROP_PRICE1,iOpen(NULL,PERIOD_W1,0));
ObjectSet("openw1",OBJPROP_PRICE2,iOpen(NULL,PERIOD_W1,0));
ObjectSet("openw1",OBJPROP_TIME1,iTime(NULL,PERIOD_W1,0));
ObjectSet("openw1",OBJPROP_TIME2,iTime(NULL,PERIOD_W1,0));
Although from iTime definition: Returns the value of time of the bar opening specified by the shift parameter from the corresponding chart(symbol, timeframe). In case of error the function returns 0.
Please, tell me, where did I screw up?
Images with examples are attached. The first TF D1, the second TF W1
"Looking" should be in private, not dumping broken indicators on the forum of the official site ...
Artemida70, need help from a professional working with genetic algorithms.
I wrote Expert Advisor, it works and even gives a small profit. Following your advice I have introduced some dynamic parameters. Now I have a big problem, there are more than ten parameters in my EA. It is almost impossible to optimize the EA because of a large number of parameters .
I have understood the basic idea of and the block diagram of genetic algorithm (GA) and found links to sites with programs of genetic algorithms.
I have a big gap in knowledge of working with external programs, compatibility of external programs with the algorithmic language MQL4, no knowledge of how to organize the EA's interaction with external programs.
Please help to solve this question, or recommend a professional who works with GA and assists newbies.
Thank you.
Artemida70, need help from a professional working with genetic algorithms.
I wrote Expert Advisor, it works and even gives a small profit. Following your advice I have introduced some dynamic parameters. Now I have a big problem, there are more than ten parameters in my EA. It is almost impossible to optimize the EA because of a large number of parameters .
I have understood the basic idea of and the block diagram of genetic algorithm (GA) and found links to sites with programs of genetic algorithms.
I have a big gap in knowledge of working with external programs, compatibility of external programs with the algorithmic language MQL4, no knowledge of how to organize the EA's joint work with external programs.
Please help solve this question, or recommend a professional who works with GA and helps newcomers.
Thank you.
One. It takes patience (eight posts of the same kind to delete)
Second. We need to simplify the EA. Perhaps, some parameters are not needed or may be affected by others (but it is difficult to say without the code).
Artemida70, need help from a professional working with genetic algorithms.
I wrote Expert Advisor, it works and even gives a small profit. Following your advice I have introduced some dynamic parameters. Now I have a big problem, there are more than ten parameters in my EA. It is almost impossible to optimize the EA because of a large number of parameters .
I have understood the basic idea of and the block diagram of genetic algorithm (GA) and found links to sites with programs of genetic algorithms.
I have a big gap in knowledge of working with external programs, compatibility of external programs with the algorithmic language MQL4, no knowledge of how to organize the EA's joint work with external programs.
Please help solve this question, or recommend a professional who works with GA and helps newcomers.
Thank you.
Hi all! Quick question - I want the line to drag behind the price. What am I doing wrong here?
Hi all! Quick question - I want the line to drag behind the price. What am I doing wrong here?
I think you'll find the answer to your question.
Here's a pretty detailed beginner's guide to using some of the standard functions and methods for building objects in the various windows of the terminal...
I think you'll find the answer to your question.