[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 587

 

Thank you guys so much!

I got it:) The trend line is initially drawn as a ray and we set it to false, i.e. the line will be drawn from point A to point B.

Now we can go to bed)

 
rigonich:


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 parsing (spaces, tabs, line breaks, parentheses), otherwise you will confuse yourself and others will be confused.

For now it's enough, fix it and then we'll see.

))) I see, I will try to do, although it seemed to me that everything here is correct and very simple))) Thank you very much for your time.
 
Sergstuddek:
))) I see, I will try to do, although it seemed to me that everything here is correct and very simple))) Thank you very much for your time.

Here's the script, according to your question.
Files:
eqhby.mq4  4 kb
 
By the way, I wonder why none of the beginners write indicators? Only owls. I, for example, started with indicators, still a bit simpler and better suited to learning and training.
 
rigonich:
By the way, I wonder why none of the beginners write indicators. Only owls. I, for example, started with indicators, it's a bit easier and better suited for learning and training.

By the way, it is also interesting to me that a person who has lived "18 years and over" has not formulated a simple understanding: "Read it once - don't understand it, read it again, and so on until you understand it. There is a "bearded anecdote" about it:

На родительском собрании учитель математики жалуется на своих учеников их родителям:

- У вас удивительно тупые дети. Сегодня я объяснял им новый материал. Один раз объяснил, они не поняли. Второй раз объяснил, опять не поняли. 
Третий раз объяснил, сам понял, а они всё ещё не поняли.

It's one of peculiarities (properties) of human brain - instinctiveness. ;) Apparently at the animal level it's a school thing: "Marivanna, I READ!!!" :)))

P.S. Although in my days (in the anecdote) it was a student and a teacher with a question: "How such (wave) current flows through such (straight) wires" - but the essence does not change... :)))

 
what does extern int mean ? there is no such command(extern) in the handbook.
 
lottamer:
what does extern int mean ? There is no such command(extern) in the handbook.
I need to read it again.
 
rigonich:
By the way, I wonder why none of the beginners write indicators? Only owls. I, for example, started with indicators, it's a bit easier and better suited for learning and practicing.


apparently because they do NOT need indicators. They do not need indicators. And beginners (traders) are not beginner programmers, they have other tasks. I don't want to learn mql in details either... just because there is no such a task. Instead, there's a task to make your life easier, for which you need to write a not too complicated Expert Advisor, but to learn the whole language... it's kinda hard... :)))

It is clear that later you'll need another EA or script ... and one way or another the language will be learnt ... but gradually ... very gradually ... :))

 
TarasBY:
Leave the keyboard alone - read and study, you can do that too, and then take a pencil and draw a diagram of your EA, when you have drawn it - go back to the keyboard. :)))


THANK YOU!!!! the real clarification of many things has come! :)))

All that's left to do is to look at it by example, and then battle!

 
TarasBY:
I'll have to read it again.


Oh! Now I get it! But it's not in the MetaEditor's help... :((