Announcement

Collapse
No announcement yet.

Chart Updates with offsetSeries

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

  • Chart Updates with offsetSeries

    if(Symbol == null) {Symbol = getSymbol();}
    if(Interval == null) {Interval = getInterval();}
    var vSymbol = Symbol+","+Interval;
    xMA1 = offsetSeries(eval(Type)(Length1,eval(Source)(sym(v Symbol))),Offset);

    In the above, all of the parameters are passed into main from the functional parameters in premain. This works fine when offset=0. When offset is a negative number, the chart does not update. My return statement uses xMA1.getValue(0).

    I searched the forum but couldn't find any specifics. Any ideas about this problem are appreciated Thanks.

    Bob
    Last edited by AssetHound; 02-20-2009, 08:23 AM.

  • #2
    Re: Chart Updates with offsetSeries

    Bob
    When using a negative offset the plot can be updated by the efs engine only if you are returning a series and not a value.
    If for any reason you want/need to return a value then you need to update the plot yourself using the setBar() function. If you run a search for negative offset you will find several threads on the subject that will provide you with examples on how to do it.
    Alex


    Originally posted by AssetHound
    if(Symbol == null) {Symbol = getSymbol();}
    if(Interval == null) {Interval = getInterval();}
    var vSymbol = Symbol+","+Interval;
    xMA1 = offsetSeries(eval(Type)(Length1,eval(Source)(sym(v Symbol))),Offset);

    In the above, all of the parameters are passed into main from the functional parameters in premain. This works fine when offset=0. When offset is a negative number, the chart does not update. My return statement uses xMA1.getValue(0).

    I searched the forum but couldn't find any specifics. Any ideas about this problem are appreciated Thanks.

    Bob

    Comment


    • #3
      Re: Re: Chart Updates with offsetSeries

      Thanks, Alex.

      Bob


      Originally posted by Alexis C. Montenegro
      Bob
      When using a negative offset the plot can be updated by the efs engine only if you are returning a series and not a value.
      If for any reason you want/need to return a value then you need to update the plot yourself using the setBar() function. If you run a search for negative offset you will find several threads on the subject that will provide you with examples on how to do it.
      Alex

      Comment


      • #4
        Re: Re: Re: Chart Updates with offsetSeries

        Bob
        You are most welcome
        Alex


        Originally posted by AssetHound
        Thanks, Alex.

        Bob

        Comment

        Working...
        X