![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
OK, Great topic !!!!
then What is Volume? the count of tick change times, or the the count of trades times, or amount of trade fund in a period ?
To restate:
My basic finding is if there is a change in MarketInfo() for the pair, a "tick" is received.
.
There may be exceptions, like "no changes found" but a tick was received, but it is very rare.
Ticks received with no price change are not rare, and signal some other change in MarketInfo for the pair.
.
Volume is equal to the number of ticks received, i.e. the number of times the start() function was called, it is not specifically trades or Bid/Ask changes. Change in MarketInfo()triggers a tick, and tick count = volume.
.
Volume is equal to the number of ticks received, i.e. the number of times the start() function was called.
Yes, but some ticks may be missed (the start() function was not called) because previous start() still not complete.
At incoming of new quotes, the start() function of the attached experts and custom indicators will be executed. If the start() function launched at the preceding quote was running when a new quote came, the new quote will be skipped by the expert. All new quotes income while the program was being executed are skipped by the program until the current execution of the start() function has been completed. After that, the start() function will be run only when a successive new quote incomes. For custom indicators, the start() function will be launched for recalculation after the current chart symbol or timeframe has been changed independently on new quotes incoming. The start() function will not be run when the expert properties window is open. The latter cannot be opened during the expert execution.
I'm not using the Start() function to trigger, I am using a script with an endless loop to examine MarketInfo().
I will rewrite the script, since the experiment has taken an unexpected direction.
.
Ticks received with price change or no price change, tick count = volume.
But Client MT maybe not received ALL Ticks for some reaseons like net break temporarily some seconeds.
then tick count = volume is it count or change times on server. or defined by broker want to change its price how much times in a period.
Is that right ?
For a broker take part in market to hedge it clients teade positions, Volume, it is also defined by broker want to change its price how muvh times in a period.
My God !
How to use the volume data ?
Questions on Marketinfo().
Will excessive Marketinfo() calls in an endless loop be considered spam by the Broker?
What would Not be considered spam?
How often can you execute Marketinfo() and not upset the Broker?
Does the Marketinfo() command pull from the Brokers cache, or is it a real requote??
Thanks
MarketInfo() calls do not go to the Dealer, it reads the most recent values already received from the dealer.
Calls to the Dealer will require about 100-300 milliseconds each to complete.
// script int start(){ int startTime = GetTickCount(); for(int i = 0; i < 10000; i++){ int spread = MarketInfo(Symbol(), MODE_SPREAD); } int endTime = GetTickCount(); Print("Time to collect 10000 instances of data = " + (endTime -startTime) + " milliseconds"); startTime = GetTickCount(); OrderSend(Symbol(), OP_BUY, 1, Ask, 0, 0, 0 , "", 0, 0, CLR_NONE); endTime = GetTickCount(); Print("Time to send one order to Server = " + (endTime -startTime) + " milliseconds"); return(0); }
Phy - sorry to open this topic again :-)
I'm thinking that there is a mis-match between what you believe about the nature of a tick and your method of calculating profit/risk etc. (from reading some previous posts).
That is that you use MarketInfo(Symbol(),MODE_TICKVALUE) on its own in order to determine the pip value of the pair expressed in terms of the deposit currency.
However, if what you believe about ticks in MT4 is correct, then the tick value can change by a factor of the number of pips between ticks.
In other words, if the price suddenly jumps a couple of pips, a prior call to MarketInfo could reveal that TICKSIZE and TICKVALUE are 0.0001 and 7.16 respectively. Then the next call could return 0.0002 and 14.32.
In this case you would always have factor both MarketInfo(Symbol(),MODE_TICKSIZE) and MarketInfo(Symbol(),MODE_TICKVALUE) into your profit/risk formulae and never MarketInfo(Symbol(),MODE_TICKVALUE) on its own.
Is this accurate?
CB
.
For Euro at MBTrading:
10000 MODE_LOTSIZE Lot size in the base currency.
0.1 MODE_TICKVALUE Tick value in the deposit currency.
0.00001 MODE_TICKSIZE Tick size in the quote currency.
.
Replace the word "tick" with "pip" above, if you like.
.
This broker uses mini-lot as standard size -- MODE_LOTSIZE
They use 3/5 digits for price -- MODE_TICKSIZE
Value of one of those "ticks" is $0.10 -- MODE_TICKVALUE
.
For GBPAUD:
.
10000 MODE_LOTSIZE Lot size in the base currency.
0.080262 MODE_TICKVALUE Tick value in the deposit currency.
0.00001 MODE_TICKSIZE Tick size in the quote currency.
.
GBPAUD single pip move on one lot pays $0.080262
.
Your idea for computing the price change of your order fom one moment to the next...
PositionValueChange = PriceChangeInPips * MarketInfo( OrderSymbol(), MODE_TICKVALUE) * OrderLots();
.