Forum

Simple calculations not right in MQL5 LOG or when writing into a CSV file

Hello all, I have a script here that calculates a moving average of the last N mid prices (N = 5, mid price = bid+ask/2) at every book event, (10++ per second). My issue is about the simple calculation. I dont know if there is some kind of delay because of the loop that populates the array i

Calling a OnTick block COMMENT inside the OnBookEvent block

Hello all, I've been coding a EA of mine that calls both events that happen OnTick and OnBookEvent. Id like to plot both of them on the chart, but i cant seem to do so without one "flashing" the other. Everytime a BookEvent happens, the BookEvent comment shows up and "erases", "flashes"

Creating a TickCounter using MqlTick and CopyTicks [suggestions plz]

Hi there, I'm still new to OOP and MQL5 in general, and I'm trying to find out a way to use arrays and comparing their different "i" values . The idea is to create a "tickcounter", and for every "last tick" compare it to the "previous tick" and see if they were different (bigger, smaller) and then

MT5 Order List - Routing Ordes to Socket Connector and NOT getting double orders,

hi there all, i recently started using this code here https://www.mql5.com/en/articles/344 to route orders out of MT5 using a socket bridge, and i wanted to route ORDERS, not DEALS, so there is no need to wait for the Orders to become Deals after execution (dont want to get slipped by the delay). im