Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 368
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
there is an example of Moving Average.mq4 Expert Advisor in the terminal - it has this:
I've seen it in another one:
Use MT4Orders - library for MetaTrader 5
I'm trying to figure out CopyTime, but I don't understand why DayData[] doesn't fill in (I want to see date rounded to whole day). I've added an example below, if anyone notices a mistake, please point it out or correct it:
A whole page of empty posts (forum error). Had to delete.
Good day to you all!
I'm gradually learning mql4 from Evgeniy Zhdanov's book.
It describes an example of Envelopes, Zigzag application.
The iCustom and iEnvelopes functions are described there to receive Envelopes and ZigZag indicators data.
Can you advise where to find information and learn the data - than to describe the other indicators?
Maybe there is a link to a resource where I can learn which functions are described by which indicators?
Or is it all in the help?
I am sincerely thankful in advance!
see iRsi and iBands
https://docs.mql4.com/ru/function_indices
see iRsi and iBands
https://docs.mql4.com/ru/function_indices
Thank you so much!
Got my scuba gear, went for a dive!
There is also this question.
The following Expert Advisor is prescribed
If ZigZag is less than two Envelopes - open buy.
If ZigZag is larger than two Envelopes - open Sell.
Then if an order is opened by an EA - modify the order by so-and-so TP and so-and-so STOP.
There are no errors in compilation.
And here is the problem, no matter how I try to test it, the strategy tester always opens the first Buy order which the tester stubbornly refuses to modify. Furthermore, all orders open only for Sell, which are perfectly modified and do not cause any problems.
Is there some kind of error in the code?
Or is this a feature of the tester? I always start with any date I choose "use date" and the first order to buy is always unmodifiable. Then all my sell orders that are modified and work fine.
I have not found any information about this yet.
Thanks for your kind attention!
Why does the tester produce different results with
extern bool Tral =true;
...
void OnTick()
{
if (Tral)Trailing();....
and if Tral is not moved to external variables, but simply uses the same function with the same variables:
void OnTick()
{
Trailing();
Why does the tester give different results at ....
Try :
... or do you really need extern ?