Announcement

Collapse
No announcement yet.

customMA from EFS 2 custom doesn't work as advertised

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

  • customMA from EFS 2 custom doesn't work as advertised

    To say that this has been difficult is an understatement. I've looked through the forums etc. and in all told have probably spent several days on this very problem. Here's what I've found.

    I started with the customMA efs code as a template because ****an important point***eventually I want to track the plots of
    some MAs on different intervals...so I'll have to use the 'inv()' function...and so the customMA (as a template) lends itself
    nicely to the task on first review.

    if(bInit == false){
    if(Symbol == null) Symbol = getSymbol();
    if(Interval == null) Interval = getInterval();
    var vSymbol = Symbol+","+Interval;
    xMA = offsetSeries(eval(Type)(Length,eval(Source)(sym(vS ymbol))),Offset);
    setShowTitleParameters(eval(Params));
    bInit = true;
    }


    Relative to offsetSeries, The EFS Library Help gives this description:

    "offsetSeries( series, offset )

    New in EFS2. This function is used to offset into the past (negative offset) or into the future (positive offset)."


    If you open up the code in the editor and set the offset to -5...(NEGATIVE 5) save it and load it into a chart. A 30second chart for instant feedback. It's loads..but doesn't update with the bars. I can't reference the value either...using getValue. Not for a MA with a negative offset. And that is my goal...to ultimately compare several negative offset MA's with the current MAs so as to create signals long or short.


    Now I'm not trying to imply that I know the thing is broken...it might be the case I'm just too freaking idiotic to figure it out...but I can't seem to get it to work. con't

  • #2
    One potential source of help might be the Moving Average Study from the Basic Studies menu.

    On an Advanced Chart...right click...select 'Basic Studies'...select 'Moving Average'...

    In the dialog box that appears...leave it a simple moving average based on the close. Make the length 10 ***here's an important

    part*** make the Offset -5. Make it whatever color you wish...whatever thickness. Now press 'Save As Default'.

    Now any time you select the Moving Average indicator from the Basic Studies menu...that very indicator magically pops up on your

    chart.

    What I'm wondering...praying for actually...is that the default settings are saved to some kind of system file...(I hoping an efs

    file) that I might be able to explicitly reference to figure out how to plot AND reference the values of a MA with the above settings.

    Ironically plotting the line is less important (ultimately) since I need to reference the values to test for long or short signals. But the plotting of the MA allows for checking of accurracy.

    Any help is much appreicated,

    g

    Comment

    Working...
    X