What am I doing wrong ...........

 

Hi, im trying to do some optimization, by using a variable to input (close,open,low,high)

for testing, but I get the unexpected token message, is this allowed?

========================================================

switch (valuefour)

{
case 0: value4="Close";break;
case 1: value4="Open";break;
case 2: value4="High";break;
case 3: value4="Low";break;
}

//result="wait"; // Wait to make sure of a good trend.
if ((jaw<teeth) && (value1[candle1]<value2[candle2])&& (value3[candle3]<Bid))result="buy"; <------------------------- cant I do this ??
if (result != currenttrend)
{
fnClose();

}




'[' - unexpected token (283, 27)

 

if ((jaw<teeth) && (value1[candle1]<value2[candle2])&& (value3[candle3]<Bid))result="buy";

probably value1 has not been defined as an array;

 
wadem000:

if ((jaw<teeth) && (value1[candle1]<value2[candle2])&& (value3[candle3]<Bid))result="buy";

probably value1 has not been defined as an array;

You are right Wadem, thank you, I'll try that and let you know...........

Reason: