Announcement

Collapse
No announcement yet.

series objects & efs Internal... Help required

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • series objects & efs Internal... Help required

    I'm endeavouring to follow the logic in the attached 'Trailing stop' efs. I am lost at line 122 and again with functions on lines 206 and 210. At best I have a vague understanding of 'efs Internal',
    and the conversion of 'series objects' baffles me!!

    My head hurts... please help.

    Regards
    Attached Files

  • #2
    line 122:
    PHP Code:
    nInv         invgetInterval() ); 
    I read this as simply returning the same series as the chart, ie the default series, so when you do say "close(0)", you should always get the same result with "close(0,nInv).
    As there is no function like "getChartSeries()" that would return the current chart series this acts as an alterntive.
    This series can then be passed to a function that needs a series as an argument.

    efsInternal fuctions are processed "asynchronously" by the efs engine so that there is a series available to the engine that can then be used in other series-requiring processing. That is, when one is created you will find that it gets called for each historic bar to generate a value for each bar and trhen for each tick when the chart is proxcessing live data. To set the context (symbol and interval) a series is passed, hence the need to create one. Although as the series is optional (defaults to the chart setting), it would seem to be trivially redundant in this case, but by leaving it there the code is more flexible as a different interval could be passed, I assume.

    Well that's how I think it works, so would be pleased to hear if I'm wrong or if it can be expressed more simply.

    Comment


    • #3
      Thanks Dave,

      After a search for 'efsInternal', I eventually found an old thread by Alex which goes into all the detail I need...



      As I said I was struggling to fully comprehend efsInternal, series objects and the various new methods introduced in efs2 to facilitate multi interval indicators etc. I found the above very helpful.

      Regards

      Comment

      Working...
      X