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

 
Guys, I have a stochastic in my EA.
How do I get it into input parameters?
I'm sick of rewriting the code every time I want to play with stochastics
 
Sergey Lobzankin:
guys, my EA has a stochastic
How can I put it in the input parameters?
I'm sick of rewriting the code every time I want to play with stochastics

Here, you can see how to take it out.

 
if ( Ask <= PriceLow && CountBuy() == 0 ) 'CountBuy' - function not defined
if ( Bid >= PriceHigh && CountSell() == 0 ) 'CountSell' - function not defined
int CountBuy() 'CountBuy' - function can be declared only in the global scope
int CountSell() 'CountSell' - function can be declared only in the global scope

Could you explain to me, programmers, what is the error?
 
KRIKS:
if ( Ask <= PriceLow && CountBuy() == 0 ) 'CountBuy' - function not defined
if ( Bid >= PriceHigh && CountSell() == 0 ) 'CountSell' - function not defined
int CountBuy() 'CountBuy' - function can be declared only in the global scope
int CountSell() 'CountSell' - function can be declared only in the global scope

Could you explain to me, programmers, what is the error?

The CountBuy and CountSell functions are not declared. Judging by what's written next:

int CountBuy() 'CountBuy' - function can be declared only in the global scope   
int CountSell() 'CountSell' - function can be declared only in the global scope 

These functions do exist, but are declared inside other functions. The declaration should be placed outside the body of any function.

 
KRIKS:
if ( Ask <= PriceLow && CountBuy() == 0 ) 'CountBuy' - function not defined
if ( Bid >= PriceHigh && CountSell() == 0 ) 'CountSell' - function not defined
int CountBuy() 'CountBuy' - function can be declared only in the global scope
int CountSell() 'CountSell' - function can be declared only in the global scope

Please explain to me, programmers, where is the error?
What is written here? CountBuy() 'CountBuy' - the function can be declared only in the global scope
 
Artyom Trishkin:
What's written here? CountBuy() 'CountBuy' - function can be declared only in the global scope
Ihor Herasko:

The CountBuy and CountSell functions are not declared. Judging by what's written next:

These functions do exist, but are declared inside other functions. Need to take the declaration outside the body of any functions.

Thanks !!! I realized I messed up with the brackets.

 
Maybe I can get people from here who can help with advice
https://www.mql5.com/ru/forum/238796
Bollinger Bands при вызове даёт значение равное 4-м знакам
Bollinger Bands при вызове даёт значение равное 4-м знакам
  • 2018.04.20
  • www.mql5.com
Всем привет. Я настолько редко обращаюсь с просьбами на форум, проще самому поискать в инете, но тут случай отдельный. Проблема в следующем...
 
Павел Козлов:
Maybe I can get people from here who can help with advice
https://www.mql5.com/ru/forum/238796
Use the custom BB. Its code is in the editor.
 
Artyom Trishkin:
Use custom BB. Its code is in the editor.
I went into the code to look at this stuff.
IndicatorDigits(Digits);

I don't know about everyone, but I have two places where indices and experts are located, it is C:\Program Files (x86)\ MT4\MQL4\indicators and C:\Users\AppData\Roaming\MetaQuotes\Terminal\CE01488447B8E5332C971089AB90 (this folder opens from terminal File-Open data directory) in both places I looked for code and it is identical.I may have missed the point again, can you clarify it for someone who doesn't know. What is the difference between custom and standard and where to find both?

 
Павел Козлов:
I went into the code to study this thing.

I don't know about everyone, but I have two places where indices and experts are located, it is C:\Program Files (x86)\ MT4\MQL4\indicators and C:\Users\AppData\Roaming\MetaQuotes\Terminal\CE01488447B8E5332C971089AB90 (this folder opens from terminal File-Open data directory) in both places I looked for code and it is identical.I may have missed the point again, can you clarify it for someone who doesn't know. What is the difference between custom and standard and where to find both?

Where exactly do you run the indicator in the terminal?
Reason: