Simple script illustrating getting the maximum value in an array. Code identical for MQL4 and MQL5. MT4 output: MT5 output:
There’s a few things that could give the Invalid Prices error from OrderModify. 1. If you are trying to modify price, SL, TP, with the same values as before. 2. If you are trading on an asset which tick size is not the same as the smallest increment of the least significant value, e.g. Nikkei 225 mini … Continue reading
A quick script illustrating how to get the P&L of the last closed trade with MQL5.
Yesterday night at 11:45pm I was coding for the past hour-plus and my wife was chasing me to shower and sleep, telling me I would have 20 mins to finish up. 10 minutes in and 2 decision trees in my neural RAM, she comes and tells me the spare toilet’s cistern is dripping water. I … Continue reading
24th June 2016 saw one of the highest days of volatility coupled with illiquidity ever seen. I happened to be logging tick data when it occurred. This post shows the spread across 3 brokers servicing different clientele and with different liquidity providers. To put things into perspective, the typical spread for GBPUSD is around 1 … Continue reading