Questions from Beginners MQL5 MT5 MetaTrader 5 - page 163
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 wrote the simplest indicator in mql4, I wanted to translate it to mql5, and I have been struggling for a week, but it is not working! I'm getting on my nerves, I hate mql5 because I have already written 88 lines of a simple 34-line indicator in mql5!
Here is the code on mql4:
And here is the code on mql5:
Indicator lines are not displayed correctly in MT5.
What have I done wrong?
Good people, help me, have pity on the poor guy, I'm on the verge of a breakdown, honestly. It's a shame you can't swear in here!
Moderator, don't ban me, first give me a warning if something is wrong.
Take a look at https://www.mql5.com/ru/docs/indicators
There is a code of standard indicators there
Thank you!
Maybe I didn't ask the question correctly, I figured it out myself, I was looking for this:
You need ArraySetAsSeries(..., true), for all buffers (in OnInit()) and everything will work. // In MT5, default =false.
This does not help... Because on EVERY tick there is multiple (tens of thousands of times) call of CopyOpen and CopyClose functions, which leads to freezing of the indicator and in some cases, the terminal.
In addition, in the CopyOpen it is obvious that the array is exceeded, and in mql5 it leads to a halt of the program execution. And the terrible CPU load, as it turns out.
This does not help... Because on EVERY tick there is multiple (tens of thousands of times) call of CopyOpen and CopyClose functions, which leads to freezing of the indicator and in some cases, the terminal.
In addition, in the CopyOpen it is obvious that the array is exceeded, and in mql5 it leads to a halt of the program execution. And the terrible load on the CPU, as it turns out...
What a creepy algorithm you have).
This creepy algorithm is not mine. It's just that the person(author) asked for help and he was politely sent away!
Afternoon !
Can you tell me how I am learning to trade on the demo.
I made a short with stoploss, after 10 min pause and quotes were not loading from the server. After the download a 5000 pips candlestick jumped and stop was weak.
Is it a fault of the demo? Or it may happen on a real account?
I have already downloaded it but I have not downloaded it yet.
Afternoon !
Can you tell me how I am learning to trade on the demo.
I made a short with stoploss, after 10 min pause and quotes were not loading from the server. After the download a 5000 pips candlestick jumped and the stop was weak.
Is it a fault of the demo? Or it may happen on a real account?
I have already downloaded it but I have not downloaded it yet.
sbr080:
Or does it also happen in a real account?
Does what happen?
spikes of a hundred pips?
or a losing trade?
Gentlemen, please tell me what to write in the last two lines when modifying a pending order if its lifetime is set. (e.g. 6 hours - ).
request.type_time = ORDER_TIME_SPECIFIED; // the order will be active until the expiry date
request.expiration = TimeCurrent()+6*3600;//last known server time + number of hours*hours
If the lifetime doesn't change, can we not write anything at all when modifying? By default it will die by itself.
And if you need to change its life?
Modify Pending Order
Trade request to modify pending order price levels. 7 fields are required:
-action
-order
-price
-sl
-tp
-type_time
-expiration
These are the two lines in the Handbook that I can't get into:
type_time
Type of order at expiration time. Value can be one of the values ENUM_ORDER_TYPE_TIME
expiration
Expirationtime of the pending order (for ORDER_TIME_SPECIFIEDorders )