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());
}

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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);}