[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 243

You are missing trading opportunities:
- Free trading apps
- Free Forex VPS for 24 hours
- 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 made a virtual trawl with horizontal lines, it works fine in the tester, but during optimization the tester probably doesn't work with these lines, why? and how to fix it?
Why do you need a horizontal line? Store the value of the line in a variable and you'll be happy!!! And the Expert Advisor will "think" faster! And you can leave the horizontal line just for visual effect.
And the reason is as follows: the tester works with graphical objects only in visual mode! When optimizing, there is no visual mode at all... Although, you can try to leave the chart with "visual" in brackets after the name of TF and pair... But I do not know if it will help or not. I have not checked it. I thought it would help, because we can see orders appearing and disappearing on this chart (that was used for visualization testing before) (even though the chart has not been activated yet)... Maybe Someone will tell us!
My advice to you - do not use extraction of parameters from graphical objects. Let these parameters be stored in variables... Don't make the graphical object a variable! :))))
Hello.
Question: can OrderSend() return a value of "0", or less than "-1" after execution? Has anyone encountered anything like this? Or is the information given in the "documentation" correct:
P.S.: working as a telepath, looking for an error in someone else's code...Hai!
Why not? If an order is not opened due to a requote, for example.
For this there is a loop for the real opening of orders, for example, such as this - the number of attempts to open with error handling:
Hai!
Well, why not? If, for example, an order is not open on a requote...
Hi Roman.
Because usually the OrderSend() function returns "-1" on error... Not "0" and certainly not less than "-1". But still, maybe Someone had precedents?
Hi Roman.
Because usually OrderSend() returns "-1" on error... Not "0" and certainly not less than "-1". But still, maybe Someone had precedents?
Hi Roman.
Because usually OrderSend() returns "-1" on error... Not "0" and certainly not less than "-1". But still, maybe Someone had precedents?
One would have to trade in a CONCRETE kitchen if the Ordersend() returns "0", much less < -1. :-)
By the way, interesting topic about errors. I learned that if 0 (zero) is returned, there is no error and the order is accepted by the broker. If not accepted, then an error is returned, but which is greater than zero.
In the description of the OrderSend() operator there is a note "...or -1 in case of failure". But what type of error should there be for the broker to return -1? Does anyone know?
OrderSend() returns "-1". And the error type should be checked with function GetLastError()! Don't confuse the two... There is an error code "1" which means "No error, but result unknown"... I haven't encountered an error with code "-1" and I don't think there is one! :D
Does the GetLastError() function return 0? Or are you writing about OrderSend() function?
OrderSend() returns "-1". And the error type should be checked with GetLastError()!!! Don't confuse the two... There is an error code "1", which means "No error, but result unknown"... I haven't seen an error with code "-1" and I don't think there is one! :D
Good afternoon. Can you please tell me where I can get period_converter with a function that allows me to set the reference point. For example, I need to make a chart D2 of D1, when I start YYY.MMM.DDD HH.MM and from this date it starts converting candlesticks.
I have found something similar (even on this forum), but for some reason does not want to start converting from even numbers (starts with odd and all) may tell me what to change in code or change it yourself. I would be very grateful. Here's what I found.
Dear All
I am new to forex and am new to forex, i would like to ask for some advice from the local gurus.
I am working with MT4 terminal.
When working with a chart for a currency pair it's convenient to switch the scale: "М1", "М5", .....
So, on M1 it displays the history for the last 38 hours as about 2000 candlesticks, while on M5 it is 270 hours but also about 2000 candlesticks.
In the first case the timeframe for a candle will be 60s, and in the second case it will be 470s. Can we pull the history for 270 hours (or more) with 60sec candlesticks?
Thanks in advance