Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
The advisor does not put the Straddle (buy and sell) in at the proper time on InterbankFX charts. It was programmed it to put in a Buy Stop and Sell Stop simotaniously at the TimeAHour, TimeAMin. Can someone help with the problem?? I am willing to give the strategy once fixed I use to one who fixes it that I use live trading now averaging 15 pips per day.
Could you please post instructions on how to use this?
What Time frequency should it be used on? 1 min, 5 min?
What do the input parameters mean? Such as MagicNumber, TimaAHour, TimeAMin, GMTShift, LiveHour, LiveMin?
I'm sorry, I am new to using the Expert Advisors. I have successfully compiled and attached your EA to a chart, but I can't seem to get it to make any trades.
Sorry about the lag in testing it.
It works on the times but I tried when I had it built to not put in more than 1 Buy Stop and Sell Stop when the time is hit.
It puts in more when the S/L or T/P is hit or the pendings are deleted. I want it to put in 1 Buy Stop and Sell Stop at the time set then not put in anymore trades til the time comes around again.
Hi,
I have fixed your EA. Small bug was in spread calculation.
Try to test and any proposal please.
Igor
Hi Igor,
Sorry to trouble you but i am reallly stuck in this MQL programming thing and hope if you can help.
How do i add a code into my MT4 EA if i only want the trades to be active for a certain time period of a day...say maybe only to trade from (broker time- 7pm to 9pm daily)?
Many thanks in advance if you are able to help...
Grateful,
Ed
Hi Igor,
Sorry to trouble you but i am reallly stuck in this MQL programming thing and hope if you can help.
How do i add a code into my MT4 EA if i only want the trades to be active for a certain time period of a day...say maybe only to trade from (broker time- 7pm to 9pm daily)?
Many thanks in advance if you are able to help...
Grateful,
Ed
You may use this code:
Code:
if (UseHourTrade){
if(!(Hour()>=FromHourTrade&&Hour()<=ToHourTrade)){
Comment("Non-Trading Hours!");
return(0);
}
}
to be inserted after int
Code:
start()
For example:
Code:
int start()
{
if (UseHourTrade){
if(!(Hour()>=FromHourTrade&&Hour()<=ToHourTrade)){
Comment("Non-Trading Hours!");
return(0);
}
}
And in the settings of EA type the following:
Code:
extern bool UseHourTrade = True;
extern int FromHourTrade = 19;
extern int ToHourTrade = 21;
CTCBN = Numbers Candles to check Before News For determining High & Lows , when it is 1 it check 2 candles the current candle and the 1 last one
SecBPO = Seconds Before News Which EA Will Place Pending Orders
SecBMO = Seconds Before News Which EA Will Stop Modifying Orders
STWAN = Seconds To Wait After News to Delete Pending Orders
OCO = One Cancel The Other , will cancel the other pending order if one of them is hit
BEPips = Pips In profit which EA will Move SL to BE+1 after that
but i think the last version has a bug and you cant change the lot size in the EA. or you change the lot size it in the code at this place and compile it:
// lot at this point is number of standard lots
return(0.10);
if (UseHourTrade){
if(!(Hour()>=FromHourTrade&&Hour()<=ToHourTrade)){
Comment("Non-Trading Hours!");
return(0);
}
}
to be inserted after int
Code:
start()
For example:
Code:
int start()
{
if (UseHourTrade){
if(!(Hour()>=FromHourTrade&&Hour()<=ToHourTrade)){
Comment("Non-Trading Hours!");
return(0);
}
}
And in the settings of EA type the following:
Code:
extern bool UseHourTrade = True;
extern int FromHourTrade = 19;
extern int ToHourTrade = 21;
Hi NewDigital,
Thanks for your help..
The example you gave is from 1900hrs to 2100hrs.
What if i would like to trade from 1930 to 2130hrs?
Thanks in advance....sorry if my post is dumb...cos i am new to mql.
Thanks for your previous help again.
Would like to ask you a favor again as i could not find the code to include if i want to close all trades at the end of the day like at 2355hrs?
Thanks in advance.
warmest regards,
ed
Quote:
Originally Posted by newdigital
You may use this code:
Code:
if (UseHourTrade){
if(!(Hour()>=FromHourTrade&&Hour()<=ToHourTrade)){
Comment("Non-Trading Hours!");
return(0);
}
}
to be inserted after int
Code:
start()
For example:
Code:
int start()
{
if (UseHourTrade){
if(!(Hour()>=FromHourTrade&&Hour()<=ToHourTrade)){
Comment("Non-Trading Hours!");
return(0);
}
}
And in the settings of EA type the following:
Code:
extern bool UseHourTrade = True;
extern int FromHourTrade = 19;
extern int ToHourTrade = 21;