[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 269
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
1. To decide exactly what a normal function should return, I should know why the main code needs such a value. For example, if I want to make a decision to open a buy order when there is a signal, I will write a function that returns the number of already opened buy orders. Depending on how many there are, the code will make a decision following the logic embedded in the code. I don't know what logic is embedded in the return code. Today I was looking through an article about creating a semaphore and I came across a return code (-2). Surprised, asked a question here. That's all. ( https://www.mql5.com/ru/articles/1412 - article here).
2. the terminal ignores the return values. Is this accurate? If so, then again a legitimate question arises, why in creating an EA/indicator/script the developer put in a template exactly int, because it would be more logical to put there void - then the terminal would not have to ignore anything - we would then gain 1 tact of processor time? Maybe there is some logic in WHAT to return from int init(), int deinit() and int start() functions? I think Roche already explained it to someone somewhere - he remembered a description of when to return zero and when to return (-1). It was this very explanation I was searching for. Too bad I couldn't find it...
P.S.
The author of the article uses return(-2) for his own purposes. But the fact is that sometimes the start() function ends with code returning a value different from zero. And it is not only one person who does it. This is exactly this logic I want to understand.
1. I cannot add anything to it. Whatever you want, return it.
2. The terminal ignores it and your code doesn't ignore it, if that's how it's built. The system call ignores both parameters and the return value. It's pretty obvious. Where does it go back to in this case?
We can only guess at the creation of the pattern. The developers must have proceeded from the default INT.
how you can understand these lines:
Write like this and look in the journal:
Can you give me some advice?
I use several indicators that use date in global variables
If you change the date in the history, you have to change it in all indicators.
Ihave made an indicator that sends shift value through iCustom to int bars.
But the problem is that it passes the unchanged date which is compiled (02.07.2012), but when you change it manually (02.06.2012) it's not passed!
WHY and WHAT TO DO????
Here is the receiver
Comment writes shift 16. And at 02.06.2012 should be 48.
Please help advise!
help me determine the last high and low of a zigzag in an EA
double zz1;
int start()
{
zz1=iCustom(NULL,0, "ZigZag", 12, 5, 3, 0, 1);
MessageBox("zz1="+zz1,"zz1");
return(0);
}
"0.00000" is coming out
help me determine the last high and low of a zigzag in an EA
double zz1;
int start()
{
zz1=iCustom(NULL,0, "ZigZag", 12, 5, 3, 0, 1);
MessageBox("zz1="+zz1,"zz1");
return(0);
}
"0.00000" is coming out
I want to put "Alert()" in it to tell me when the trend has reversed.
I want to put "Alert()" there to tell me when the trend reversed.
Z.I. I'm a little better at mql4 than I am at ballet, but...1. I can't add anything. Whatever you want, return it.
2. terminal ignores and your code doesn't ignore, if that's how it's built. The system call ignores both the parameters and the return value. It's pretty obvious. Where does it go back to in this case?
We can only guess at the creation of the pattern. The developers must have proceeded from the default INT.
A tick has come, the terminal calls the EA's start() function. You state that the value returned by this function is indifferent to the terminal. Is this documented anywhere?
I want to put "Alert()" in it to tell me when the trend has reversed.
I want to use "Alert()" to tell me when the trend reverses.
Z.U. I'm a little better at mql4 than I am at ballet but...Lines
I think that the first two buffers are the indicator of a trend change. They have red marks on top of candlesticks and blue ones on the bottom. Only the yellow-grey combination works as an indicator of trend reversal. For them it will be accordingly:
There, in the values of those buffers, dig.Indicator posted just above.....
Or it doesn't change in any way?????
Could you guys tell me about the date transfer via iCustom?