snippet - MQL5: Action at new candle
5 Oct, 2021
Do work only at the time of the birth of a new candle.
snippet - MQL5: Get current spread
4 Oct, 2021
This snippet shows how to get current spread as points. If you want it in price then you have to multiply it with point size or get ask and bid difference.
snippet - MQL5: Get current bid/ask price
4 Oct, 2021
This snippet shows how to get current bid and ask price. Two prices are there for buy and sell pricing and the difference of those is your spread.
snippet - MQL5: Trailing stop
1 Oct, 2021
How to implement trailing stop to MQL5. Basically during every tick you iterate through all positions, when trailing stop can be moved higher/lower it will do just that.
snippet - MQL5 for GeSHi
1 Oct, 2021
MQL5 language file for GeSHi (Generic Syntax Highlighter). I used C++ langague file to base this on, since MQL is based on C++. I don't think it's the best possible highlight and ideally would use...
snippet - MQL5: Close all trades at the end of the day
1 Oct, 2021
This snippet is of a code that will close all trades at the end of the day. The percise time can be modified to your preferations.
snippet - MQL5: random if else
1 Oct, 2021
To get a random result, you can take MathRand() and use the modulus operator, it gives the reminder of division.
snippet - ArchLinux: windows boot partition
11 Aug, 2021
Add windows boot partition to grub. By default grub doesn't detect other operating systems. You need to get os-prober, it is an optional dependency of grub. Also by default it is disabled, so you...
snippet - Javascript: object keys and values to html table
14 Jun, 2021
Convert javascript object into html table, where keys are in the first column and values are in the second column. This uses plain javascript so you can use it anywhere.
snippet - PHP error: class 'DateTimeZone' not found
1 Mar, 2021
PHP
DateTimeZone class is built into php. If you get error that it's missing, then it's namespace problem.