MQL5 question: why using scripts / OnStart? New comment vAbsKXMS9Q3Q2TQD 2021.03.23 15:11 Hello, please can somebody help me with a basic question. Just for the background: I am able to create quite complex programs in MQL5, I think I have understood (most of the) basics. But I do not understand why I would be using "scripts" and the "OnStart" function? is this a way to make MQL5 programs more modular? or are scripts only used to be attached to a chart to do some things only once? I don't get the concept. If I do write an Expert Advisor, is there still a need to work with scripts? Many of the examples in the documentation refer to "scripts" and "OnStart", so I would really like to understand how this is supposed to work. thanks a lot in advance!!! Understanding an Indicator Help to upgrade to MetaTrader 5 without loss [ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. William Roeder 2021.03.23 16:33 #1 vAbsKXMS9Q3Q2TQD: or are scripts only used to be attached to a chart to do some things only once? Correct. (Once when attached.) vAbsKXMS9Q3Q2TQD 2021.03.26 12:59 #2 thanks a lot! I wonder why this is not explained in a more obvious way in the documentation? However, thanks for clarifying it here to me. New comment
Hello, please can somebody help me with a basic question.
Just for the background: I am able to create quite complex programs in MQL5, I think I have understood (most of the) basics.
But I do not understand why I would be using "scripts" and the "OnStart" function?
is this a way to make MQL5 programs more modular?
or are scripts only used to be attached to a chart to do some things only once?
I don't get the concept.
If I do write an Expert Advisor, is there still a need to work with scripts?
Many of the examples in the documentation refer to "scripts" and "OnStart", so I would really like to understand how this is supposed to work.
thanks a lot in advance!!!