snippet - PHP: Imagick rotate and merge
1 Dec, 2021
PHP
Rotate and merge image using data from css transform. In this code example the input data comes from javascript where visually image is rotated using css transform property. CSS transform and Imagick...
snippet - PHP: Imagick resize / scale image
1 Dec, 2021
PHP
Change the size of an image by resize or scale an image. The resizeImage method is an inbuilt function in PHP which is used to scale an image to the desired dimensions.
snippet - PHP: Imagick transparent background
30 Nov, 2021
PHP
In order to work with transparent images, you have to define image as transparent. Do that immediately after creating an instance, by setting the object's default background color with...
snippet - PHP: Imagick read image files from URL
24 Nov, 2021
PHP
The code example shows how to read an image from url to Imagick. Imagick doesn't take in url directly, but it has a method for reading file as binary content. So we just need to get the content form...
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.