Questions from Beginners MQL5 MT5 MetaTrader 5 - page 147

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
I don't understand why the data on the zero bar is not correct, please advise
I get this result
2013.10.27 17:45:26 Core 1 2013.01.01 00:00:00 369878 2012.12.31 19:00:00 2012.01.02 00:00:00
2013.10.27 17:45:26 Core 1 2013.01.01 00:00:00 369878
I forgot to tell the whole thing in the expert.
Or in other words when testing EA from XXX date to YYY date, to what depth from XXX data can be downloaded?????????????????
I need advice on the code: I took an adviser from the database, tested it, added it, subtracted it, changed the coefficients to get a good picture, the picture seems to turn out, but nothing works on the demo, it’s the other way around, it’s like evil, I adjust everything as according to the articles taught and charts good for a month by 100% increases. So it’s only for the tester and it’s suitable or should it be tested somehow differently ??? I would also like to remake TreilingParabolikSAR so that not stop losses move along it, but laymen at a given distance from the price, maybe someone will tell you where to get it, so far it has not come across. Here is one of the resulting codes with good graphs - tell me what is wrong, what to fix, although everything may be wrong here ...
Testing a certain value, above which a trade is opened.
Parameters for entry:
bool Sell_Condition = (signal >= sgl);
I choose the value of variable sgl in the tester:
variable type "signal" double.
When running a single test I see that with sgl=0.003 the entry is performed at 0.0024, 0.0027, 0.0015, etc.
The triggering logic is correct, but the execution accuracy is not.
How can I improve the execution accuracy?
...
How do you improve the accuracy of your performance?
Try it:
Is there a relatively easy way to convert a date from a "non-standard" string format to datetime or at least an easily convertible string format?
In particular, if the month in the string is Jan/Jeb/..., how do I feed it to the script? I mean, only by manually picking the month from the string, by replacing it with the appropriate number in 12 variations? Or am I missing somewhere how to specify the format for StringToTime etc?
I've got a construction like this handling it right now:
...but somehow I don't like it, although it works conventionally.
MA_1_t - small period, MA_2_t - medium period, MA_3_t - large period.
If I do the following conditions:
bool Buy_Condition_1=(MA_1_t < MA_2_t && MA_2_t < MA_3_t);
then trades are opened.
The conditions are reversed:
bool Buy_Condition_1=(MA_1_t > MA_2_t && MA_2_t > MA_3_t);
Not a single trade. What could be the reason?
EA code:
MA_1_t - small period, MA_2_t - medium period, MA_3_t - large period.
If I do the following conditions:
then trades are opened.
The conditions are reversed:
Not a single trade. What could be the reason?
EA code:
To get the value of the indicator you need to create an indicator handle in OnInit, and then copy the value into an array using CopyBuffer in OnTick. The article Trading Operations in MQL5 just shows how to write easier code for opening/closing a position/order.
Can you tell me how to close a pending order that did not open? I am trying to do it this way:
Or in line mrequest.price=NormalizeDouble(Bid-(SL-45) *_Point,_Digits); should I write other information? Thank you.Can you tell me how to close a pending order that has not opened? I am trying to do it this way:
Or in line mrequest.price=NormalizeDouble(Bid-(SL-45) *_Point,_Digits); should I write other information? Thank you.