I am creating a trend indicator called Heikin-Ashi that operates by coloring price bars red and green.
The following fragment of the program is producing an error at:
setPriceBarColor(Color.lime);
The error text is:
"Heikin-Mod-A.efs Line 85 Parameter number 1 of function setPriceBarColor is invalid."
I've used this function in other .efs and it works fine. Maybe another pair of eyes can see the error.
Thank YOu,
Ed Hoopes
[email protected]
START Heikin-Ashi code fragment here: - - -
//Execute this on all subsequent passes ;
if (v1st_pass == "false") {
haClose_Prev = haClose_Curr ;
haOpen_Prev = (haOpen_Curr + haClose_Prev) / 2.0;
haOpen_Curr = (haOpen_Prev + haClose_Prev) / 2.0;
haClose_Curr = (open() + close() + high() + low()) / 4.0;
if ( haClose_Curr > haOpen_Curr)
{
setPriceBarColor(Color.lime);
Color = "lim";
}
if ( haOpen_Curr > haClose_Curr)
{
setPriceBarColor(Color.red);
Color = "red";
}
The following fragment of the program is producing an error at:
setPriceBarColor(Color.lime);
The error text is:
"Heikin-Mod-A.efs Line 85 Parameter number 1 of function setPriceBarColor is invalid."
I've used this function in other .efs and it works fine. Maybe another pair of eyes can see the error.
Thank YOu,
Ed Hoopes
[email protected]
START Heikin-Ashi code fragment here: - - -
//Execute this on all subsequent passes ;
if (v1st_pass == "false") {
haClose_Prev = haClose_Curr ;
haOpen_Prev = (haOpen_Curr + haClose_Prev) / 2.0;
haOpen_Curr = (haOpen_Prev + haClose_Prev) / 2.0;
haClose_Curr = (open() + close() + high() + low()) / 4.0;
if ( haClose_Curr > haOpen_Curr)
{
setPriceBarColor(Color.lime);
Color = "lim";
}
if ( haOpen_Curr > haClose_Curr)
{
setPriceBarColor(Color.red);
Color = "red";
}
Comment