Announcement

Collapse
No announcement yet.

Non time-sequential custom series

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

  • Non time-sequential custom series

    In EFS2 I can create custom series by calling efsInternal/efsExternal and using a custom function to produce each value in the serie. However all the series are built sequentially, meaning that the custom function is called for the bar on the chart in a strictly sequential order.
    Is it possible to create arbitrary custom series? For example, if I want to put together all the 5 minutes 9:30 bars for the last 10 days in an array, can I pass this specific array to a EFS2 built-in functions?

  • #2
    probtrader

    Originally posted by probtrader
    Is it possible to create arbitrary custom series? For example, if I want to put together all the 5 minutes 9:30 bars for the last 10 days in an array, can I pass this specific array to a EFS2 built-in functions?
    You can create a custom series of a value or an array using the efsInternal() or efsExternal() functions. However in the case of an array each element of the array would be a series of its own which you would access using the getSeries() function. You cannot use that array as the source of an EFS2 built-in function. You would instead need to process that array in the separate function or efs.
    Alex

    Comment


    • #3
      Originally posted by Alexis C. Montenegro
      probtrader



      You can create a custom series of a value or an array using the efsInternal() or efsExternal() functions. However in the case of an array each element of the array would be a series of its own which you would access using the getSeries() function. You cannot use that array as the source of an EFS2 built-in function. You would instead need to process that array in the separate function or efs.
      Alex
      Do you mean something like this?
      PHP Code:
      vMySeries = new Array();
      vMySeries[0] = 1;
      vMySeries[1] = 2;
      vMySeries[2] = 3;

      function 
      processArray(pos) {
        return 
      getSeries(vMySeries[pos]);
      }

      function 
      main() {
        
      ema(3efsInternal("processArray"));

      How do I pass the right parameter to processArray() from efsInternal()?

      Comment


      • #4
        probtrader
        For an example on how to use the getSeries() function to retrieve the elements of an array that is being called through efsInternal() or efsExternal() see this thread
        Alex

        Comment

        Working...
        X