Announcement

Collapse
No announcement yet.

One day only, inverse symbols

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

  • One day only, inverse symbols

    Hello,

    I am trying to view SPY overlayed with an inverse plot of UUP, on a One-Day-Only (ODO) time template.

    But using 'UUP * (-1)' directly or as a Spread Symbol seems to be ignored by my ODO time template - multiple days plot. So I tried the attached efs which will display ODO of UUP data only when I use a multiple day time template, (but then I see multiple days of SPY data). If I use this efs with the ODO time template, I get one day of SPY data, and see no UUP plot.

    Can this efs be modified to plot inverse UUP when a ODO time template is being used?

    Thanks
    shaeffer
    Attached Files

  • #2
    Re: One day only, inverse symbols

    shaeffer
    The reason the efs will not plot anything when the chart has only one day of data is because the condition getDay(0) != getDay(-1) never evaluates to true as there is no bar with a previous date hence the variable bCurrentDay never gets set to true
    In this case simply remove all the code used to plot the returned values on the current day only
    Also unless you need to return a moving average you can just use the close() series of the external symbol rather than the sma() series of the external symbol
    Alex


    Originally posted by shaeffer
    Hello,

    I am trying to view SPY overlayed with an inverse plot of UUP, on a One-Day-Only (ODO) time template.

    But using 'UUP * (-1)' directly or as a Spread Symbol seems to be ignored by my ODO time template - multiple days plot. So I tried the attached efs which will display ODO of UUP data only when I use a multiple day time template, (but then I see multiple days of SPY data). If I use this efs with the ODO time template, I get one day of SPY data, and see no UUP plot.

    Can this efs be modified to plot inverse UUP when a ODO time template is being used?

    Thanks
    shaeffer

    Comment

    Working...
    X