Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1263
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
How can an EA in testing mode determine which ticks simulation mode is used in a test?
How canan EA distinguish between "OHLC on M1" and "Opening price only"?
I will answer my own question. Type of ticks modelling is printed in "Model"
https://www.mql5.com/ru/forum/318305/page12#comment_14176127
Can you tell me how to get
FaceValue = ?
и
AccruedInterest = ?
These values are used in the pledge/profit calculation for
SYMBOL_CALC_MODE_EXCH_BONDS
SYMBOL_CALC_MODE_EXCH_BONDS_MOEX
in formulas
Margin: Lots * ContractSize * FaceValue * open_price * /100
Profit: Lots * close_price * FaceValue * Contract_Size + AccruedInterest * Lots * ContractSize
Good afternoon, may I ask about the tick arrival time generation algorithm for M1? Excerpt from the help.
Testing of strategies
In fact, OHLC prices are present in history data. Therefore, only arrival times of Open, High, Low and Close ticks are generated during testing, price values are taken from history.
Good afternoon, may I ask about the tick arrival time generation algorithm for M1? Excerpt from the help.
Testing of strategies
In fact, OHLC prices are present in history data. Therefore, only arrival times of Open, High, Low and Close ticks are generated during testing, price values are taken from history.
Real and generated ticks
Real and generated tics
That's where I took the excerpt from the text. I am interested in how the ticks arrive (time of arrival, highlighted in bold)
That's where I took the extract from the text. I am interested in how the ticks come (time of arrival, highlighted in bold)
In OHLC mode there are no ticks as such. Naturally, the time between four points is divided into four intervals.
To check: put Print in OntTick() and run in OHLC mode.
Hello. Can you give me a hint?
How do I check if the time is a trade time or not?
(for the EA to start working immediately, without waiting for the first tick)
Hello. Can you give me a hint?
How do I check if the time is a trade time or not?
(for the Expert Advisor to start working immediately, without waiting for the first tick)
OnTimer()
but what kind of bids are you going to put in your orders?)
https://www.mql5.com/ru/docs/event_handlers/ontimer
OnTimer()
just what kind of bids will you put in the orders?)
https://www.mql5.com/ru/docs/event_handlers/ontimer
This is not the question. The question is how to make the Expert Advisor start working, including trading, when the time is right, without waiting for a new tick.
This is not the question. The question is how to make the Expert Advisor start working, including trading, when it is time to trade, without waiting for a new tick.
The Expert Advisor processes events. If you don't want to wait for the NewTick# event, which is handled by theOnTick function, you can use the
boolEventSetTimer(int seconds// number of seconds
);
to generate events fromtimerwith specified periodicity, the Timer# event is handled by OnTimer() function. Your Expert Advisor will work continuously (with some periodicity) without waiting for the tick events.