Good afternoon, may I ask about the tick arrival time generation algorithm for M1? Excerpt from the help.
Testing of strategies
OHLC on M1 - in this mode only 4 prices of each minute bar are simulated - prices Open, High, Low and Close.
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
OHLC on M1 - in this mode only 4 prices of each minute bar are simulated - prices Open, High, Low and Close.
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.
Для тестирования и оптимизации советников необходимы тики, так как именно по ним работает советник. Тестирование может осуществляться на реальных тиках, предоставляемых брокером, или же на тиках, сгенерированных тестером стратегий на основе минутных данных. Реальные тики # Тестирование и оптимизация на реальных тиках являются максимально...
i.e. the function in the Expert Advisor will work without ticks coming in
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.
Сразу же после того, как клиентский терминал загрузит программу (эксперт или пользовательский индикатор) и запустит процесс инициализации глобальных переменных, будет послано событие Init, которое обрабатывается функцией OnInit(), если она есть. Это событие также генерируется после смены финансового инструмента и/или периода графика, после...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.