Hi Coders
I try to insert a function in my EA to choose the trading days.
The function for trading hours works well.
For trading hours i use following:
extern string TradingHours = "TRADING HOURS";
extern bool UseHourTrade = True;
extern int FromHourTrade = 8;
extern int ToHourTrade = 18;
and later after int start:
if (UseHourTrade){
if (!(Hour()>=FromHourTrade && Hour()<=ToHourTrade)) {
Comment("Time for trade has not come else!");
return(0);
But what is needed for select the trading days?
When I define the extern as follow:
extern string TradingDays = "TRADING Days";
extern bool UseDayTrade = True;
extern int FromDayTrade = DayOfWeek;
extern int ToDayTrade = DayOfWeek;
then I have follow two messages:
'DayOfWeek'-variable expected
what's to do?
Somebody can help me?
Thanks for any help
I try to insert a function in my EA to choose the trading days.
The function for trading hours works well.
For trading hours i use following:
extern string TradingHours = "TRADING HOURS";
extern bool UseHourTrade = True;
extern int FromHourTrade = 8;
extern int ToHourTrade = 18;
and later after int start:
if (UseHourTrade){
if (!(Hour()>=FromHourTrade && Hour()<=ToHourTrade)) {
Comment("Time for trade has not come else!");
return(0);
But what is needed for select the trading days?
When I define the extern as follow:
extern string TradingDays = "TRADING Days";
extern bool UseDayTrade = True;
extern int FromDayTrade = DayOfWeek;
extern int ToDayTrade = DayOfWeek;
then I have follow two messages:
'DayOfWeek'-variable expected
what's to do?
Somebody can help me?
Thanks for any help