MetaTrader 5 Platform Update Build 5320: Services in CodeBase and improved input operations in MQL5 - page 2 12 New comment Gerard William G J B M Dinh Sy 2025.09.29 06:21 #11 And I thought that oncalculate was called every tick but apparently, some passages are made without a new tick //+------------------------------------------------------------------+ //| New Tick.mq5 | //| Copyright 2025, William210 | //| https://www.mql5.com/fr/users/william210 | //+------------------------------------------------------------------+ #property copyright "Copyright 2025, William210" #property link "https://www.mql5.com/fr/users/william210" #property version "1.00" #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit () { //--- indicator buffers mapping //--- return ( INIT_SUCCEEDED ); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate ( const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { static long Last_Tick_Volume = - 1 ; static int Call_Counter = 0 ; long Current_Tick_Volume = tick_volume[ rates_total - 1 ]; // Test: tick unchanged but OnCalculate called if ( Current_Tick_Volume == Last_Tick_Volume ) { Call_Counter ++; Print ( "Passage without new tick: call #" , Call_Counter, " | Time = " , TimeToString ( time[ rates_total - 1 ], TIME_DATE | TIME_MINUTES ), " | TickVolume = " , Current_Tick_Volume ); } else { Call_Counter = 0 ; Last_Tick_Volume = Current_Tick_Volume; printf ( "New tick detected | TickVolume =" , Current_Tick_Volume ); } return ( rates_total ); } //+------------------------------------------------------------------+ Dominik Egert 2025.09.29 07:37 #12 Gerard William G J B M Dinh Sy #: And I thought that oncalculate was called every tick but apparently, some passages are made without a new tick Nope.Please see this thread for all details on ticks and OnCalculate:https://www.mql5.com/en/forum/454153 Stefan P. 2025.09.30 16:18 #13 Dear MetaTrader team, would you please add Adding alarm(s) via context menu? E.g.: Mouse pointer on 65.480. Context menu shows "Alarm for 65.480" with available sub menu with four items: Bid >, Bid <, Ask >, Ask<. Thank you very much for your attention!! Adding new markets to How do I add Wishes for MT5 Michael Charles Schefe 2025.10.01 02:01 #14 Stefan P. #: like this? Max0r847 2025.10.01 15:45 #15 Detached charts still do not remember toolbar setting. If you disable toolbar, it will come back upon terminal restart. This has been the case since dark mode was added Stefan P. 2025.10.05 09:38 #16 Michael Charles Schefe #: like this? Thank you very much! I didn´t knew that (I use a Trade Pad for Pending/Market Orders). 12 New comment
but apparently, some passages are made without a new tick
And I thought that oncalculate was called every tick
but apparently, some passages are made without a new tick
Dear MetaTrader team,
would you please add Adding alarm(s) via context menu?
E.g.: Mouse pointer on 65.480. Context menu shows "Alarm for 65.480" with available sub menu with four items: Bid >, Bid <, Ask >, Ask<.
Thank you very much for your attention!!
like this?
Detached charts still do not remember toolbar setting. If you disable toolbar, it will come back upon terminal restart. This has been the case since dark mode was added
like this?