[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 585
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
It will look for the bar index with the maximum price in the last 9 bars, assuming you run the program at 10 o'clock. Hour() is the start time of the program (server time).
P.S. More precisely, not the index, but the maximum price (High) of this bar.
and this condition doesn't help...
Well, then I don't know. You have to look through the code, not only the function, but the whole program, insert error checking, print variable values and the last error and look for a specific error location in the code. When I was debugging my own programs, if they were rather large (about 1000 lines), it sometimes took me weeks, i.e. more time than when I was writing them.
Hi all!
I'm looking at an example from a textbook. I can't understand what function the following condition performs:
I have attached the code myself. The Expert Advisor colors the last n bars.
Please help me to understand it.
void,int,bool which precede an initialized function, indicate the type of variable whose value the function returns to the program to continue working with it.void indicates that the function doesn't return any values (if the result of the function is, for example, to close or open orders, or change values of global variables, which shouldn't be returned, because it
As for theOTHERlanguage, there is an English version of the forum. Language is simply a set of rules and in a certain language there are common names for objects and phenomena. If you use names that are not common, but the ones you prefer, you won't be understood.
I think I got it :)) thank you :))
The essence of the work of the EA is simple: at a certain time (01.00 to 10.00) determine the minimum and maximum price and put the pending orders
I have already seen your code and I don't know what to say. AsTarasBY said above, it's easier to say what's right in it:
As I told you above - Seconds(),Minute(),Hour() functions return server start time, and under this condition if (Hour()==10), your function will not work if you didn't start your Expert Advisor at 10 o'clock. You have such conditions all the time. Carefully read the description of functions in Help.
2.if (TIMECLOSEHIGH19>TIMEOPENLOW19) and if (TIMECLOSELOW19<TIMEOPENHIGH19) -- these are conditions that will always work.
3. Do not write 3 or 4 almost identical functions in one program, make one function and pass to it the required parameters when you call it. This is not an error, but it makes your code cumbersome and hard to read.
4) Use any, but always the same system of arrangement of syntax characters (spaces, tabs, line breaks, brackets), otherwise you will confuse yourself and others will be confused.
That's enough for now, fix it and then we'll see.
Hi all!
I'm looking at an example from a textbook. I can't understand what function the following condition performs:
I have attached the code myself. The Expert Advisor colors the last n bars.
Please help me to understand it.
See also ObjectSet().
I looked at your code, I don't know what to say. AsTarasBY said above, it's easier to say what's right in it:
As I told you above -- Seconds(),Minute(),Hour() functions return server start time, and under this condition if (Hour()==10), your function will not work if you didn't start your Expert Advisor at 10 o'clock. You have such conditions all the time. Carefully read the description of functions in Help.
2.if (TIMECLOSEHIGH19>TIMEOPENLOW19) and if (TIMECLOSELOW19<TIMEOPENHIGH19) -- these are conditions that will always work.
3. Do not write 3 or 4 almost identical functions in one program, make one function and pass to it the required parameters when you call it. This is not an error, but it makes your code cumbersome and hard to read.
4) Use any, but always the same system of arrangement of syntax characters (spaces, tabs, line breaks, brackets), otherwise you will confuse yourself and others will be confused.
For now it's enough, fix it and then we'll see.
You should have a monument to yourself by now! The biggest problem in helping "tomorrow's PROGRAMMER" is that he can't realise or even explain "what he wants???", because there is no way he can get the kolbak-insert-perk all at the same time! :)))
As Kissa Sparrowmaninov used to say. Yeah.
See also ObjectSet().
Here's what I've already written:
-------------------------------------------
int start()
{
purchase condition,
the purchase itself,
and modification
return(0);
}
-----------------------------------------
The problem is that now I need to enter NEW conditions, close conditions, and then close itself, and my EA starts modifying infinitely (stop and take are fixed, but the message about successful modification pops up with every tick).
How can i now create a loop inside this start for new conditions and closing, so the first part of the EA will not be affected until it closes completely?