I will write an advisor free of charge - page 121

 
Sysmart:
I need a simple EA in mql5. At the beginning of its work, 2 buttons buy/sell should appear, pressing one of them should open a deal with parameters, which are predefined and magic number. Once the button is pressed, it should disappear until the moment when there are no open positions on the given chart. If this time has come, the buttons should appear.

everything you described is exactly what thisButon Lot Profit.mq5 does

 

Please send me an .ex4 Expert Advisor with no errors that you can post on the website.

I have one of my own but it generates errors I can't understand why, see the difference in the code

 
Oleg Aliev:

Please send me an .ex4 Expert Advisor with no errors that you can post on the website.

I have one of my own but it generates errors I can't figure out why, see the difference in the code

Here you go - no thanks.

<file *.ex4 deleted
 
Alexsandr San:

Here you go - no thanks.

You have the same thing as me !

EX4 file must be compiled using#property strict directive.The version name is not specified. Please specify the version in the source code using #property version

Свойства программ (#property) - Препроцессор - Основы языка - Справочник MQL4
Свойства программ (#property) - Препроцессор - Основы языка - Справочник MQL4
  • docs.mql4.com
, которые помогают клиентскому терминалу правильно обслуживать программы без необходимости их явного запуска. В первую очередь это касается внешних настроек индикаторов. Свойства, описанные во включаемых файлах, полностью игнорируются. Свойства необходимо задавать в главном mq4-файле. Путь к файлу с картинкой, которая будет показываться для...
 
Oleg Aliev:

You have the same as me !

EX4 file must be compiled using the#property strict directive.The version name is not specified. Please specify the version in the source with #property version

and try this

---------------------

I understand that you want to post your code and you are asked to put#property strict in your code

then put it like this

//+------------------------------------------------------------------+
//|                                              Utility Command.mq5 |
//|                           Copyright © 2020, Aleksandr Klapatyuk. |
//|                             https://www.mql5.com/ru/users/klaxse |
//+------------------------------------------------------------------+
#property copyright   "Copyright © 2020, Aleksandr Klapatyuk"
#property link        "https://www.mql5.com/ru/users/klaxse"
#property description "Copyright © 2020, Vladimir Karputov"
#property description "http://wmua.ru/slesar/"
#property description "Klymenko Roman (needtome@icloud.com)"
#property description "https://www.mql5.com/ru/users/needtome"
#property description "Copyright © 2020, SEM "
#property description "https://www.mql5.com/ru/users/seliveru"
#property version     "1.030"
#property strict

Files:
MACD.mq4  6 kb
 
Alexsandr San:

Try this one.

the extension is wrong, you need ex4

 
Oleg Aliev:

the extension is wrong, you need ex4

paste it as I have shown above and compile your code

-------------

And copy your code again after compiling with the extensionex4

 
Alexsandr San:

insert as I have shown above and compile your code

-------------

And copy your code again after compiling withex4 extension.

Show me on this example please )

Files:
 
Oleg Aliev:

Show me on this example please )

You already have#property strict there

compile it in the metadvisor - then copyex4 - it will have this structure

Constant

Type

Description

strict

Specifies the compiler to apply a special strict mode of error checking (see Updated MQL4)


When writing MQL4 programs, it was decided to introduce a new property #property strict. When creating a new MQL4 program using the MQL4 Wizard, this property is always added to the template .

 
Alexsandr San:

You already have#property strict there

compile it in the metadvisor - then copyex4 - it will already have this structure

Constant

Type

Description

strict

Specifies the compiler to apply a special strict mode of error checking (see Updated MQL4)


When writing MQL4 programs, it was decided to introduce a new #property strictproperty . When creating a new MQL4 program using the MQL4 Wizard, this property is always added to the template.

I'm confused (( I don't know where and how to press what