Announcement

Collapse
No announcement yet.

MESA Issues, and probably some getBarState() fun.

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

  • MESA Issues, and probably some getBarState() fun.

    I am running into some crazy EFS problems, and I am hoping someone can clear up a few things for me. Additionally, I think I have found what I believe to be a severe bug in the MESA indicators.

    Please take a moment to look at the following chart. Note, in the caption window that the top two cursor labels (Sine(C) and Lead Sine(C)) are stock MESA indicators. The lower two cursor labels are for the EFS script I have loaded.

    (if this image does not display, please refer to http://www.w4ll.st/mesa_broked.png)



    The top panel, obviously, is the price for ES. The middle panel, is indeed the Sine/Lead Sine indicator pair from the MESA addon package. The bottom panel is created by the following code which should mirror exactly what the middle panel outputs (unless I'm completely missing something)

    PHP Code:
    var mesa_sine = new MesaSineOut("Close");

    var 
    curr_sine null;
    var 
    curr_lsine null;
        
    function 
    preMain()
    {
        
    setPriceStudy(false);
        
        
    setCursorLabelName("Sine"0);
        
    setCursorLabelName("Lead Sine"1);
        
        
    setDefaultBarFgColor(Color.blue0);
        
    setDefaultBarFgColor(Color.red1);
    }

    function 
    main()
    {       
        if (
    getBarState() == BARSTATE_NEWBAR)
        {   
            
    curr_sine mesa_sine.getValue(MesaSineOut.SINEOUT);
            
    curr_lsine mesa_sine.getValue(MesaSineOut.LSINEOUT);   
        }
         
        if ((!
    isNaN(curr_sine)) && (!isNaN(curr_lsine)))
        {
            return new Array(
    curr_sinecurr_lsine);
        }

    There are a couple things to note. First of all, the values between the two panels don't match up. Why?

    Secondly, Take a moment to look at the two lines in each panel. In the cursor window, the lead sinewave oscillators are set to be displayed as 'Color.red'. Why then, is the lead sinewave oscillator in an opposite place in both panels? IE, stock MESA displays the lead sine on TOP; my code which should mirror _exactly_ what the panel above it does displays it on the BOTTOM.

    This is a pretty big issue; I'm not sure if the MESA package simply has the colors incorrectly assigned, or if everything is completely reversed.

    The trading implementation using these indicators involves a crossing scenario during a cycle mode. If these are backwards/inversed, someone could be triggering the opposite entry; In other words, I would be entering long when I should be entering short, or vice versa.

    Any explanations? Advice? Solutions? Or am I just on crack?

    Thanks in advance,
    Joshua C. Bergeron

  • #2
    Here's a screenshot of the day session. The values still aren't matching up at all.



    -jcb

    Comment


    • #3
      Hi,

      We've found and corrected the color issue - that'll be in the next release. I will look into the data issue. Do you think the EFS is incorrect? Or the builtin study?

      m.
      Matt Gundersen

      Comment


      • #4
        Cool. When's the next release?

        I'm not sure about the data issue myself, I was hoping you could provide some insight about that.

        What I can tell you though, that if I remove the getBarState() calls, that it does compute the previous bars correctly. However, the the values are still incorrect when new bars are drawn...

        I wouldn't think it is an EFS issue because other indicators work fine in this situation. BUT it may have something to do with how exactly the addon studies are implemented for use within EFS.

        Unfortunately I don't have the ability to look into that at all. I don't know if a DLL for that stuff exists locally, or if these functions are embedded into the ESignal binary somewhere or what... I imagine nobody wants to disclose that kind of information because it's a set of studies that one needs to pay for...

        I'm shrugging... But it sucks since I'm paying for them :P

        Maybe the guy who implemented the MESA indicators might know what's up? heh.

        Comment

        Working...
        X