Jump to content
Tom Next - Daytrading Community

Special Functions, Welche?


kai700

Recommended Posts

Hallo,

in der Docu und in vielen Büchern werden die "Special Functions", wie init(), deinit() und start() benutzt, alles int. In EAs und auch in Indicatoren u.s.w.

Erstelle ich im Metaeditor einen EA neu, kommt:

int OnInit()
  {
//---
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   
  }

Ist das besser oder moderner (in Richtung MQL5?)?

 

Beim Indicator ebenfalls OnInit() und vor allem int OnCalculate(const.....

 

Sollte man neue Indicatoren lieber mit OnCalculate() programmieren oder ist das mehr oder weniger egal? Vorausgesetzt, man kommt mit beiden Varianten ans Ziel.

Gruss Kai

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...