How to completely re-start EA within code
Results 1 to 5 of 5

Thread: How to completely re-start EA within code

  1. #1
    What code can I put. . Like reload EVERYTHING...

    Reload the externs , init()and start() works .... Aswell as reload the chart...

    Thank you very far

  2. #2
    You can reload the chart together with Sendkeys - will have to visit another symbol or timeframe, then back that in itself will hit the EA and reset all of the factors.
    Ps: There is example code in codebase for it.

  3. #3
    Its not simple before trying consider that you may fail.

    The best way to go about this would be to modularize your code. That means that every item is a separate function. So the Init() code will be in a separate function and all of the logic in the Start() function could be broken up into several functions. You need to consider the way to reinitialize all variables, which normally start off set to zero, when this is working. I might have forgotten something, so that there might be something else. Then there is lots of testing.

    No guarantee this will work, but its how I'd tackle the issue and I'd only tackle it if there was some compelling reason to do so.

  4. #4
    I'd put externs into init() to reset, then call init() from beginning() whenever wanted.

  5. #5
    I tell you for sure what you have to do:
    Press Compile button.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.