-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MT4] SymbolInfoTick() does not return Last and Volume #231
Comments
@vdemydiuk |
This works fine for me with this function: |
@TheSnowGuru
Well, are you using this mtapi .NET, or your own TCP/IP connector? For quick reference , the lines mentioned above are shown here . |
@eabase This is not might be an issue. Please check answer #10 to similar question on MQL5 forum: |
Indeed seem to be a problem with MT4/5 not populating their returned arguments. void OnTick()
{
long symbol_volume = SymbolInfoInteger(Symbol(),SYMBOL_VOLUME);
double symbol_volume_real = SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_REAL);
long tick_volume_array[],real_volume_array[];
MqlTick m_tick;
if(!SymbolInfoTick(Symbol(),m_tick)
|| CopyTickVolume(Symbol(),Period(),0,1,tick_volume_array)!=1
|| CopyRealVolume(Symbol(),Period(),0,1,real_volume_array)!=1)
return;
Print(TimeToString(m_tick.time,TIME_DATE|TIME_MINUTES),",",
" m_tick.bid ",DoubleToString(m_tick.bid,Digits()),
" m_tick.ask ",DoubleToString(m_tick.ask,Digits()),
" m_tick.volume ",IntegerToString(m_tick.volume),
" m_tick.volume_real ",DoubleToString(m_tick.volume_real,0),
" SYMBOL_VOLUME ",IntegerToString(symbol_volume),
" SYMBOL_VOLUME_REAL ",DoubleToString(symbol_volume_real,0),
" tick_volume_array[0] ",IntegerToString(tick_volume_array[0]),
" real_volume_array[0] ",IntegerToString(real_volume_array[0]));
} For performance consideration, don't really want to triple my API/EA requests just to get that volume for ticks... |
I noticed this before, and thought it was an MT4 issue, but in their docs, it show that this info should be available.
I don't see either Volume or Last coming from the
SymbolInfoTick()
response.The text was updated successfully, but these errors were encountered: