Hi guys, I´m new in programming mql4 und so I need your help. Here is the setup: Time=9.30 GMT so do buy 1 lot
at market (trailling stop 25 pips) and sell 1 lot at market (trailling stop 25 pips). This setup I want to trade
every day and just adjust the trailling stop. Thanks for your help. jimbofx7
- MQL5 Wizard: Development of trading robots for MetaTrader 5
- Managing Pending Orders - Trade - MetaTrader 5 for iPhone
- Managing Pending Orders - Trade - MetaTrader 5 for Android
I am kinda new also so I may not be correct, but I think if you just want to pick
an hour and are not in love with the 9:30 time you could say:
if(Hour() ==9) {
buy,sell
}
set trailing stops
if(Hour() ==9) {
buy,sell
}
set trailing stops
int newday; // global var
int start()
{
..
if(TimeHour()==9&&TimeMinute()==30&&TimeDay!=newday)
{
buy, sell
newday=TimeDay(); // this will prevent from entering multiple trades on every tick
}
also must check the time that your borker uses, they may have different time from GMT.
int start()
{
..
if(TimeHour()==9&&TimeMinute()==30&&TimeDay!=newday)
{
buy, sell
newday=TimeDay(); // this will prevent from entering multiple trades on every tick
}
also must check the time that your borker uses, they may have different time from GMT.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register