Comment function and Variable issue..

 

Hi,


I have 2 questions..


1) how can I use the comment command to write stuff on a second line.. and

2) Can you help me figure out how to get me script to work below? All I want is for the variable "Trend" to be recognized in the start function..


Thanks in advanced!!





//+------------------------------------------------------------------+
//| Alligator |
//+------------------------------------------------------------------+
bool Gator()
{
double lip;
double teeth;
double jaw;
string Trend;


Trend = "NA";
lip=iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORLIPS, 1);
teeth=iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORTEETH, 1);
jaw=iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORJAW, 1);

if((lip > teeth) && (teeth > jaw)) Trend = "UP";
if((lip < teeth) && (teeth < jaw)) Trend = "DOWN";


}


//+------------------------------------------------------------------+
//| Start function |
//+------------------------------------------------------------------+


void start()
{

Gator();
Comment("Spread: ",(Ask - Bid)," Trend: ", Trend);}

 

1) how can I use the comment command to write stuff on a second line

Comment("Hello \nWorld");

2) Can you help me figure out how to get me script to work below? All I want is for the variable "Trend" to be recognized in the start function..

//+------------------------------------------------------------------+
//| Alligator |
//+------------------------------------------------------------------+
string Gator()
{
double lip;
double teeth;
double jaw;
string Trend;
Trend = "NA";
lip=iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORLIPS, 1);
teeth=iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORTEETH, 1);
jaw=iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORJAW, 1);
if((lip > teeth) && (teeth > jaw)) Trend = "UP";
if((lip < teeth) && (teeth < jaw)) Trend = "DOWN";
return(Trend);
}

//+------------------------------------------------------------------+
//| Start function |
//+------------------------------------------------------------------+
void start()
{
Comment("Spread: ",(Ask - Bid)," Trend: ", Gator());

}

Reason: