[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 839

 
all the brackets seem to be in place
 
etroplus:
all the brackets seem to be in place.

Are they? And after return(0); where?
 

I put it in and now it gives this error

'int' - semicolon expected

points to the variable 'ticket', but is it followed by a semicolon or is it something else?)


//----
int ticket;
{
if (Bid >iHigh(NULL,PERIOD_D1,1)
{
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots_sell,iHigh(NULL,PERIOD_D1,1),3,iHigh(NULL,PERIOD_D1,1)+StopLoss_sell*Point,iHigh(NULL,PERIOD_D1,1)-TakeProfit_sell*Point)
}
if (Ask <iLow(NULL,PERIOD_D1,1)
{
ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots_buy,iLow(NULL,PERIOD_D1,1),3,iLow(NULL,PERIOD_D1,1)-StopLoss_buy*Point,iLow(NULL,PERIOD_D1,1)+TakeProfit_buy*Point)
}
//oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
return(0);
}
//+------------------------------------------------------------------+
 

it's all there, the errors have the line number and vertical position

and the whole code should be shown.

 
etroplus:

I put it in and now it gives this error

'int' - semicolon expected

points to the variable 'ticket', but is it followed by a semicolon or is it something else?)


//+------------------------------------------------------------------+


if (Bid >iHigh(NULL,PERIOD_D1,1) there is a missing right bracket

if (Ask <iLow(NULL,PERIOD_D1,1) right bracket is missing

 

'int' - semicolon expected E:\Program Files\Broco Trader\experts\news trade.mq4 (46, 4)


//+------------------------------------------------------------------+
//| news trade.mq4 |
//| Copyright © 2010, MetaQuotes Software Corp.
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp.
#property link "http://www.metaquotes.net"


extern bool In_BUYSTOP=true;
extern intProfit_buy=100;
extern int StopLoss_buy=5;
extern double Lots_buy=0.01;
//+------------------------------------------------------------------+
extern bool In_SELLSTOP =true;
extern inttern TakeProfit_sell=100;
extern int StopLoss_sell =5;
extern double Lots_sell =0.01;
//+------------------------------------------------------------------+
//| expert initialisation function |
//+------------------------------------------------------------------+
int init()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialisation function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
//----
int ticket;
{
if (Bid >iHigh(NULL,PERIOD_D1,1)
{
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots_sell,iHigh(NULL,PERIOD_D1,1),3,iHigh(NULL,PERIOD_D1,1)+StopLoss_sell*Point,iHigh(NULL,PERIOD_D1,1)-TakeProfit_sell*Point)
}
if (Ask <iLow(NULL,PERIOD_D1,1)
{
ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots_buy,iLow(NULL,PERIOD_D1,1),3,iLow(NULL,PERIOD_D1,1)-StopLoss_buy*Point,iLow(NULL,PERIOD_D1,1)+TakeProfit_buy*Point)
}
//oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
return(0);
}
//+------------------------------------------------------------------+
 

Fix the brackets. Above wrote where

 
I corrected the brackets and compiled, but the same error appears.
 

'int' - semicolon expected E:\Program Files\Broco Trader\experts\news trade.mq4 (46, 4)


//+------------------------------------------------------------------+
//| news trade.mq4 |
//| Copyright © 2010, MetaQuotes Software Corp.
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp.
#property link "http://www.metaquotes.net"


extern bool In_BUYSTOP=true;
extern intProfit_buy=100;
extern int StopLoss_buy=5;
extern double Lots_buy=0.01;
//+------------------------------------------------------------------+
extern bool In_SELLSTOP =true;
extern inttern TakeProfit_sell=100;
extern int StopLoss_sell =5;
extern double Lots_sell =0.01;
//+------------------------------------------------------------------+
//| expert initialisation function |
//+------------------------------------------------------------------+
int init()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialisation function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
//----
int ticket;
{
if (Bid >iHigh(NULL,PERIOD_D1,1))
{
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots_sell,iHigh(NULL,PERIOD_D1,1),3,iHigh(NULL,PERIOD_D1,1)+StopLoss_sell*Point,iHigh(NULL,PERIOD_D1,1)-TakeProfit_sell*Point)
}
if (Ask <iLow(NULL,PERIOD_D1,1))
{
ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots_buy,iLow(NULL,PERIOD_D1,1),3,iLow(NULL,PERIOD_D1,1)-StopLoss_buy*Point,iLow(NULL,PERIOD_D1,1)+TakeProfit_buy*Point)
}
//oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
return(0);
}
//+------------------------------------------------------------------+
 

Hello!

How do I decipher

double g_price_196;
double gd_204;
double gd_unused_212;
double gd_unused_220;
double g_price_228;
double g_bid_236;
double g_ask_244;
double gd_252;
double gd_260;
double gd_276;
bool gi_284;

Reason: