How to free indior resources? indior called from EA
Results 1 to 7 of 7

Thread: How to free indior resources? indior called from EA

  1. #1
    With http://docs.mql4.com/indiors/icustom I'm calling an indior.
    It will become slow, but not the problem.

    At EA there's a tick and every time that it calls it and becomes unresponsive and can not complete a check ( not an optimization )
    I'm wondering should I apply something to spare the resources from the indior?

    My indior use auxiliary buffers for signal filtering and it has similar to this:
    Inserted Code int OnInit() { //-- 4 extra buffers are used for counting. IndiorBuffers(4 4);
    I guess at least those 4 aren't deleted.

    Any help?

  2. #2
    Hi,

    I've not come across a mechanism to free up funds from an indior as soon as you have included included/called it in an EA (or a different indior) via iCustom().

    I've also no experience related to iwjw's expertise - but interesting!!!

    A number of things might help in solving your issue:

    1. Check in detail what happens in your indiors and in your EA, and assess how long unique parts of your calculations take: You can use t0=GetTickCount(). . .do loop/calculations....t1=GetTickCount() then print out with some extra information to permit analysis
    2. Do you really need to calculate your indior with every tick? Does your egy need comprehension of everything your indior computes on every tick, or could you simply access the info from the indior at the start of a new bar then allow trade entry at the onset of the new bar if conditions are correct. If the latter is true. . .you can simply stick access to a indi in a construction such as: if(NEWBAR) ....access icustom(indi).... Do your thing predied on calcs
    3. If access to the indi is demanded every tick, and when iwjw's alternative also doesn't help because you need / desire to change these parameters, then you may be able to move the calculations and logic from the indior to your EA. The main difference between indior and EA code (to your question) is that in a EA that you don't have any access to buffers. Dependent on the structure of the code in the indior, and also on how the data from buffers on preceding bars/calls affects the value of the buffers on the current pub, you could consider a implementation of your indior minus buffers.If it is possible to call your indior on NEWBAR, you could store the preceding value(s) of related factors in a short array, or perhaps individual factors before you figure out the values to your current pub. The downside is that you need to do some manipulation of data yourself (and need to figure that out - and think about unanticipated consequences), but the upside is enormous, because it avoids calling iCustom(indior).
    Hope that some of that helps.

    But: if your terminal freezes due to calling the iCustom(indior) there might well be something else wrong in your indior. Unless your indior does a ricidulous number of calculations. I've implemented variety of EAs with access to quite complex of time-consuming indiors. In such situations the terminal has slowed down, and in such situations the terminal prints out statements in the log file along the lines of'rewrite your indior as it takes too long to calculate'. The getting into the meat depth of the indior tends to solve the matter.

    Cheerio,
    John

  3. #3
    Someone gave me a tipp as not the indi's fault, but the EA, because I'm checking my present orders and so forth.
    I've removed almost everyything from EA and let just a two call.

    Inserted Code double ExtBufUpValue = iCustom(Symbol(), PERIOD_CURRENT, myIndi, My12ParForIndi, 0); if(ExtBufUpValue gt; 0 ) // Extended sign: all code eliminated from EA for testing else double ExtBufDownValue = iCustom(Symbol(), PERIOD_CURRENT, myIndi, My12ParForIndi 1, 1 ); should (ExtBufDownValue gt; 0) // Short sign: all code eliminated from EA for test
    This part of the code will be EXPONENTIALLY SLOWING DOWN.


    I Want to trade Just What the Indi shows.
    Should I grab all logic from Indi to EA, then it will not be somewhat slow, just slow, as I am using it at MT4.

    BTW: this indi has:
    Inserted Code iLowest Inserted Code iHighest along with Inserted Code iMAOnArray code calls to perform his stuff.
    Whem is in regular chart opinion I see it's a obvious problem with him and performing very-very slow at timeframechnages ( load and unload ) and cliching different timeframes does not help: it becomes slower, but it may be 6-7 times just.

  4. #4
    There is the problem: https://www.forexforum.co.za/trading...t-trading.html

    Inserted Code iMAOnArray
    has a Flow,

    MT4.0 Build 840, 12 Jun2015 - That the latest in my broker

  5. #5

    Metaquotes comfirmed the insect and they reply


    1. You need to open demo account on MetaQuotes-Demo server and log into.
    Accounts Open an Account click add new broker... input demo.metaquotes.net click Scan select demo.metaquotes.net click Next.
    2. Restart the terminal.
    3. Wait until LiveUpdate finished record would appear in Journal tab.
    4. Restart the terminal.
    5. Check terminal's build.

  6. #6
    From my experience one thing, that is very slowing down iCustom, is passing of parameters
    the longer input parameters your indior has, the slower iCustom would be
    to work about this, best is to call iCustom without any parameter and use the default configurations of the indior

  7. #7
    Cheers.. .not really wonderful. . .at all....but at least it's been solved?

    Cheerio,
    John

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.