Announcement

Collapse
No announcement yet.

customMACD.efs question

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

  • customMACD.efs question

    I think I must be missing something. I modified customMACD.efs to show an issue I'm having.

    If I run the customMACD.efs attached, then I get one set of results. If I then comment out the xMACD, xMACDSig and xMACDHist commands and use similar instructions but define the source directly in the instruction rather than using eval(Source) I get a similar, but different answer. In neither case am I using a different interval or symbol.

    This is under 10.0, and using ES #F, 60.

    Any thoughts?
    Garth

  • #2
    Whoops...here is the efs

    To see the problem, just run as is, then change by uncommenting the commands that are commented out and comment out the ones that aren't, and run again. Compare the two.

    Thanks,

    Garth
    Attached Files
    Garth

    Comment


    • #3
      Re: customMACD.efs question

      Garth
      Because in the following lines
      PHP Code:
      xMACD macd(Fast,Slow,Smoothing,"hlc3");
      xMACDSig macdSignal(Fast,Slow,Smoothing"hlc3");
      xMACDHist macdHist(Fast,Slow,Smoothing"hlc3"); 
      the string "hlc3" is not a valid parameter (neither as a source nor as a bar index) the formula engine simply ignores that entry and uses the default source which is close()
      In order to get the same result as the uncommented lines you would need to use hlc3() as the source parameter eg
      PHP Code:
      xMACD macd(Fast,Slow,Smoothing,hlc3());
      //etc 
      Hope this helps
      Alex


      Originally posted by gspiker
      I think I must be missing something. I modified customMACD.efs to show an issue I'm having.

      If I run the customMACD.efs attached, then I get one set of results. If I then comment out the xMACD, xMACDSig and xMACDHist commands and use similar instructions but define the source directly in the instruction rather than using eval(Source) I get a similar, but different answer. In neither case am I using a different interval or symbol.

      This is under 10.0, and using ES #F, 60.

      Any thoughts?

      Comment


      • #4
        DOH!

        Thanks Alex, I knew I was doing something stupid...

        Garth
        Garth

        Comment


        • #5
          Garth
          You are most welcome
          Alex


          Originally posted by gspiker
          DOH!

          Thanks Alex, I knew I was doing something stupid...

          Garth

          Comment

          Working...
          X