Announcement

Collapse
No announcement yet.

inv() doesn't generate the correct values

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

  • inv() doesn't generate the correct values

    Hi,

    With two charts open, a 3 min "ES #F" with a MACD(12,26,9) study for comparison and a 55T "ES #F" with the following efs running I get very different values for the *.getValue(0) for each chart. I have also used the sym(...) but it gives me the same values as the inv(...), both different from the 3 min chart values. Both charts have the same time interval, I've used 3 day dynamic for both and also tried 3 day 9:30-16:15. The 3 min chart MACD most recent value was 1.79 but the 55T chart values for inv(3) of MACD was -6.40985839...
    PHP Code:
    //this is run on a 55T "ES#F" chart
    debugClear();
    function 
    preMain() {

        
    setPriceStudy(false);
        }
    function 
    main(){
        
    SymMACD macd(12,26,9,inv(3));
        
    SymMACDSignal macdSignal(0,0,0,inv(3));
        if(
    getBarState() == BARSTATE_CURRENTBAR) {
            
    debugPrintln(SymMACD.getValue(0));
        }

    Any help is appreciated.
    Last edited by waynecd; 10-19-2008, 11:33 PM.

  • #2
    Re: inv() doesn't generate the correct values

    waynecd
    What MACD study were you using for comparison? The one in Basic Studies?
    Alex


    Originally posted by waynecd
    Hi,

    With two charts open, a 3 min "ES #F" with a MACD(12,26,9) study for comparison and a 55T "ES #F" with the following efs running I get very different values for the *.getValue(0) for each chart. I have also used the sym(...) but it gives me the same values as the inv(...), both different from the 3 min chart values. Both charts have the same time interval, I've used 3 day dynamic for both and also tried 3 day 9:30-16:15. The 3 min chart MACD most recent value was 1.79 but the 55T chart values for inv(3) of MACD was -6.40985839...
    PHP Code:
    //this is run on a 55T "ES#F" chart
    debugClear();
    function 
    preMain() {

        
    setPriceStudy(false);
        }
    function 
    main(){
        
    SymMACD macd(12,26,9,inv(3));
        
    SymMACDSignal macdSignal(0,0,0,inv(3));
        if(
    getBarState() == BARSTATE_CURRENTBAR) {
            
    debugPrintln(SymMACD.getValue(0));
        }

    Any help is appreciated.

    Comment


    • #3
      yes it was.

      Comment


      • #4
        waynecd
        Did you make sure that in the Basic Studies MACD you were using an exponential average for the Oscillator and Signal lines? From what I am seeing at my end your script is returning the same values when using the exponential average
        Alex


        Originally posted by waynecd
        yes it was.

        Comment


        • #5
          I answered too fast at first when I said yes. I checked the test page. I used the same test script without the inv() or sym(). So it should have used the default. I will check against the "Basic Studies" version using sma and ema to see if it matters.

          Wayne

          Comment


          • #6
            Alexis,

            I spent 2 hours last night testing it different ways including rebooting eSignal in case I had a bad server.

            I just tested it after your reply and MACD for both charts were similar, not exact since there are many 55T bars within a 3 min bar but close.

            I'll continue to test it at different hours to see if it is an intermitent issue.

            Thanks so much for your follow-up

            Wayne

            Comment


            • #7
              waynecd

              I just tested it after your reply and MACD for both charts were similar, not exact since there are many 55T bars within a 3 min bar but close.
              When you are returning a value then the real time plot on each 55T bar will represent the value of the 3 minute MACD at the time the 55T bar was completed which is not necessarily the same as the current value of the MACD. The value on the current 55T bar however will match that of the 3 minute MACD.
              Alex


              Originally posted by waynecd
              Alexis,

              I spent 2 hours last night testing it different ways including rebooting eSignal in case I had a bad server.

              I just tested it after your reply and MACD for both charts were similar, not exact since there are many 55T bars within a 3 min bar but close.

              I'll continue to test it at different hours to see if it is an intermitent issue.

              Thanks so much for your follow-up

              Wayne

              Comment


              • #8
                Thanks Alex

                Comment


                • #9
                  waynecd
                  You are welcome
                  Alex


                  Originally posted by waynecd
                  Thanks Alex

                  Comment

                  Working...
                  X