Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 993

 
Alexandr Sokolov:

Why is it forbidden?

For example, I published one quite simple indicator some time ago, some time later I added some more variables and widened the variability of its calculation - and it would be good to hide the previous indicator after publishing the new version with the new name (the name was changed because new variables were added)

Publish version 2. No right to hide or tear down. Do you want to bet? Then I'll timer how long it takes you to leave us. So don't argue, but listen to advice.

Also, in the past (when KodoBase was moderated manually) I was told why it's better to publish version 2 - especially if some time has passed: changes made in ru part will not show up in other parts of the forum and this will cause a lot of inconvenience to users.

 

Faced with this problem... A customer adds an indicator to the Expert Advisor using some kind of builder.

If he adds a standard muwings, the bilder allows to set parameters:

If he adds my indicator, then I'm allowed to change only the buffer (why - is unclear, as there is only one buffer)...

What can it be connected with and how is it possible to allow this builder to change parameters, but not the buffer?

The indicator is in attachment.

The MQL4 language.

P.S. Initially, the structures were set as external variables and externs were used instead of inputs. The current look is experiments that didn't work.

 
Vladimir Karputov:

When he does, both yours and his account will be deleted. So you don't give silly advice.

Is this a new rule from you? Or are the rules actually published somewhere?

 
Hello, I want to quit if the time is between 27 minutes and 32 minutes of any current hour. Please tell me how to do this.
 
yiduwi:
Hello, I want to quit if the time is between 27 minutes and 32 minutes of any current hour. Please tell me how to do this.
27 <= Minute() && Minute() >= 32
 
yiduwi:
Hello, I want to quit if the time is between 27 minutes and 32 minutes of any current hour. Please tell me how to do this.

So do the math. The opening time of the current candle plus 33 minutes, this would be 27 minutes before the H1 candle closes.

 

Is it possible for an input variable of type boolean in the Input parameters interface to make it possible to double click instead of toggling between true/false to display its text? Thanks

Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
  • 2019.11.09
  • www.mql5.com
В этой ветке я хочу начать свою помощь тем, кто действительно хочет разобраться и научиться программированию на новом MQL4 и желает легко перейти н...
 
Vladimir Karputov:

Publish version 2. No right to hide or tear down. Do you want to bet? Then I'll timer how long it takes you to leave us. So don't argue, but listen to advice.

Also before (when CodeBase was moderated manually) I was told why it's better to publish version 2 - especially if some time has passed: the change made in the ru part will not appear in the rest of the forum and this will create a great inconvenience to users.

For example, in CodeBase the author, whose copyright I hope you do not dispute, gratuitously published the code in accordance with the licenses and delegated the rights for publication, production and related developments.

in version 2 he unfortunately makes an unintentional error/mistake (division by 0 somewhere there), he by your logic also leaves us

because version 2 is tantamount to nothing.

 
Maxim Kuznetsov:

For example, in CodeBase the author, whose copyright I hope you do not dispute, published the code free of charge in accordance with the licenses and delegated the rights for publication, production and related developments.

in version #2, he unfortunately makes an unintentional error/mistake (division by 0 somewhere there), he also leaves us by your logic

because version 2 is tantamount to a blank.

When an error and it is detected immediately - then of course you need to re-file the corrected code.

 

Hello. I'm a green beginner. Some tips on the basics.

1 - why am I programming in mql4? It sends me a template for mql5 with int OnInit() and void OnTick() functions? They don't create errors, but do they work. I am starting to get confused.

2 - I am writing an Expert Advisor.void OnTick() - as I see it replaces the int start() function and int OnInit() - instead of int init().

2.1 - I've prescribed the variables that will be used inint OnInit() and it started to complain. I assigned a variable type immediately as it appears. The curse stopped. Why?

2.2 - It is easy to open pending Buy and Sell orders. Why does not it open them? Although I don't see any errors.

int BS1 = OrderSend (Symbol(),OP_BUYSTOP,lots,Ask+50,3,0,0,"bs1",1,0,clrGreen);

int SS1 = OrderSend (Symbol(),OP_SELLSTOP,lots,Bid+50,3,0,0,"ss1",-1,0,clrRed);

3 - How to screw a counter to the variable - order number. (BS1, SS1) - variables that directly tell us which order it is. So, when the EA continues to search for the necessary order, it will detect it just as easily.Will its identifier remain the same afterOP_BUYSTOP changes its value toBUY? Will I be able to find it using the data in BS1?

4 - What is the easiest way to check if any of the pending orders is already open or not, especially if possible slippage of 3 points is specified in opening parameters. I.e. it scans a range of prices, not just one price and may open at 1-3 pips above/below the default price....

5. Please advise where you can find a textbook or lessons on MQL4. I want to improve my skills. I wonder. It may be a strategy described in 2 lines, but when I open an Expert Advisor, I see 100500 lines of code. Why? It's not so easy, I can barely understand it :(


I'm flooded with questions :)) Please help me understand it.

Reason: