This snippet shows how to use timeframes as input field. For that you just have to use the ENUM_TIMEFRAMES. It contains all of the predefined timeframes. This way you can use multiple times in a...

5 Oct, 2021
Do work only at the time of the birth of a new candle.

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.

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.

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.

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...

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.

1 Oct, 2021
To get a random result, you can take MathRand() and use the modulus operator, it gives the reminder of division.

4 Sep, 2018
You can define class variables multiple ways in Python, but they also work differently. Underscore is used for "private" or "protected" variables, altough there are no such definitions in Python....

24 Dec, 2014
How to display an image in Python. Using PyQt5 application window.

24 Dec, 2014
To set window title in Python PyQt5 you must have first created a window for your application.

22 Dec, 2014
Create an application window using PyQt5 in Python. People at G+ suggested PyQt over Tkinter. So I am going to dig into that. I found a lot of tutorials about this process. Most of them included OOP...

20 Dec, 2014
Create a menu to your Python Tkinter application window. Create a simple pulldown / dropdown menu using TK in Python.

20 Dec, 2014
Create an application window using Python's Tkinter. Window is the bases of every program, even full screen is actually a window.

6 Aug, 2014
For loop in Python loops through a sequence of statements and iterates the code with current variable.

23 Feb, 2013
How to get current mouse position coordinates? You can create a simple script that shows a message box with coordinates on key-press.

6 May, 2012
The simplest way to parse csv files. I am using external library that does the magic for you. Csv file should be separated by commas and strings with double quotes.

4 May, 2012
How to create file browser dialogue in Microsoft Visual C#.

18 Mar, 2012
Simple tutorial that shows you how to create GUI button in Unity using Javascript.