Download MetaTrader 5

EA stacksize

To add comments, please log in or register
Tinashe Chipomho
422
Tinashe Chipomho  

So there is a preproccessor called stacksize, the documentation says:


MQL4 programstacksize. The stack of sufficient size is necessary when executing function recursive calls.

When launching a script or an Expert Advisor on the chart, the stack of at least 8 MB is allocated. In case of indicators, the stack size is always fixed and equal to 1 MB.

When a program is launched in the strategy tester, the stack of 8 MB is always allocated for it.


but i would like to know if the value to be used should be in bytes/kilobytes of megabytes, i searched online for any examples couldn't find any.

Does anyone know how to specify the value in MB? or know what units does the stack size use?

Local Variables - Variables - Language Basics - MQL4 Reference
Local Variables - Variables - Language Basics - MQL4 Reference
  • docs.mql4.com
Local Variables - Variables - Language Basics - MQL4 Reference
Sergey Golubev
Moderator
98417
Sergey Golubev  
I am moving your thread to MT4/MQL4 section.
Stanislav Korotky
21622
Stanislav Korotky  
Stack size is specified in bytes. Mbyte is 1024*1024 bytes.
Tinashe Chipomho
422
Tinashe Chipomho  
Stanislav Korotky:
Stack size is specified in bytes. Mbyte is 1024*1024 bytes.

Thanks
To add comments, please log in or register