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)
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
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.blue, 0);
setDefaultBarFgColor(Color.red, 1);
}
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_sine, curr_lsine);
}
}
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
Comment