FX-Krilon:
Hi,
Need help to code with time. I want to place orders before market opens. Since there are no ticks I don not get the EA to trigger on time.
The specific case is to make the EA send stop entry order at server time 06:30:00.000
I tried to search the forum but maybe I am not using the right keywords to find it.
Thank you in advance.
You can not do that
Hi,
Need help to code with time. I want to place orders before market opens. Since there are no ticks I don not get the EA to trigger on time.
The specific case is to make the EA send stop entry order at server time 06:30:00.000
I tried to search the forum but maybe I am not using the right keywords to find it.
Thank you in advance.
Mladen Rakic:
You can not do that
Aha, You can not do that
So I have to wait for the first tick when the markets open to send the order.
What will be the implications for example if the order is a buy-stop and the first tick is opened higher, will it still be executed?
A buy-stop order is an order to buy a security which is entered at a price above the current offering price, and it is triggered when the market price touches or goes through the buy-stop price.
What do you think ?
Also you can send orders but you will simple get an error (Market Closed)
For example MQL5
10018 | TRADE_RETCODE_MARKET_CLOSED | Market is closed |
And MQL4
132 | ERR_MARKET_CLOSED | Market is closed |
FX-Krilon: What will be the implications for example if the order is a buy-stop and the first tick is opened higher, will it still be executed?
| Only if the price is above the Ask by at least MODE_STOPLEVEL points. Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial |
FX-Krilon:
Aha,
So I have to wait for the first tick when the markets open to send the order.
...
Or you can place a pending order(s) before the market closes. But somehow I am guessing that it is not what you had in mind ...
Aha,
So I have to wait for the first tick when the markets open to send the order.
...
No not the pending order before market close, but thank you for the suggestion.
I will try to figure a way around it.
Thx
I will try to figure a way around it.
Thx
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
Need help to code with time. I want to place orders before market opens. Since there are no ticks I don not get the EA to trigger on time.
The specific case is to make the EA send stop entry order at server time 06:30:00.000
I tried to search the forum but maybe I am not using the right keywords to find it.
Thank you in advance.