Photo by Irvan Smith on Unsplash
Blog,  Programming

Thinking in learning how to program a robot for Forex Trading and what I have found

Now I will write something about where I find some important information about programming. If I have to say today and then when this post you read it now so this post was the other day. Do you get what I mean? Nevermind, I just want to share what is the good thing over the internet. Identify myself who likes to investigate about how to earn money and where to earn it, well where is the money articles surely interest me. I guess all the people living in this world their target is the money. I ask you if you want to create a business, what is your principal target? The probable answer is MONEY.

However, someone said that do not think first about the money and just focus on the work or project. I understand because when you are thinking money and you are short of it this tends to stress you and low your motivation to work on your own of your project. Oh, this is not the topic that I want to share and is about a little bit of programming. So, I will start the story.

In the consequences, I am interested in Forex but I will not write about it now maybe in the other post this is an intro how I met the possible help to programming. Where that day when I open the documentation of Metatrader 4 the famous program to do operations about money exchange online. I would like to describe the program but is better to feature in a post. Therefore, when I read the documentation I encounter the very fundamentals of programming. However, I forgot that you can write a program like a forex traiding robot to do the operation in that program MQL4. I will list all on the bottom as I had read in the documentation.

Syntax

According to the writer in Wikipedia, “in computer science, the syntax of a computer language is the set of rules that defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language.” Ok, every command that we want to tell the computer what to do is the syntax. The MQL4 has its own language of programming trading strategies and is similar to the C++ programming language, except for some features:

  • No address arithmetic;
  • No goto operator;
  • An anonymous enumeration can’t be declared;
  • No multiple inheritances.

Comments

The comments are annotation or explanation and whatever you want to write inside of it never in the program can be seen. You must write into the pair of symbols look the examples. Take note that programming languages have a different type of how to write comments.

Examples:

//--- Single-line comment
/* Multi-
Line   // Neste single-line commen
Comment
*/

Identifiers

In programming, you must know what is identifiers as simple as names to use of variables and functions. In my other words, is the names that you want to put of variables and functions. Do not forget to write well the identifiers using only the characters allowed to be written in an identifier: figures 0-9, the Latin uppercase and lowercase letters a-z and A-Z, recognized as different characters, the underscore character (_). Remember never put any number of the first digit like “1name” this is not acceptable.

Examples:

NAME1 → Uppercase and number → OK

Name1 → First capital letter and number → OK

Total_3 → With underscore → OK

Paper → Normal → OK

Name → Lowercase → OK

Reserved Words

Is very simple to understand that every programming languages took already any words for them to uses. However, you cannot use it as an identifier to name your variables and functions. I recommend you to check those reserved words of the programming languages that are you learning. As I want to learn how to make a robot trader in the MQL4 I did my effort to add the tables here.


Take a little bit of time. Suggested this book for you. I had this already in my bookshelf and it is absolutely amazing.


Data Types

boolenumstruct
charfloatuchar
classintuint
colrlongulong
datetimeshortushort
doublestringvoid

Access Specificators

constprivateprotected
publicvirtual

Memory Classes

externinputstatic

Operators

breakdynamic_castreturn
caseelsesizeof
continueforswitch
deletenew
dooperator

Other

false#define#property
this#importtemplate
true#includetypename
strict

Data Types

Otherwise, This is very important to know because any program operates with data. As you know data can be of different types depending on their purposes. Data types can be strings, integers, and more types. Therefore, we can specify as well the type of data like you the number 13 if you want to be a string or integer.

The basic data types are:

Complex data types are:

Great! I did some learning today or yesterday and the other day, you know what I mean. This is the beginning of the adventure dad programming. The syntaxes are clear or not but still have to polish. If you have any suggestion and correction of my post, please comment below.

Something about trading forex in Amazon check it out.

Change your life today. Don’t gamble on the future, act now, without delay.

Simone de beauvoir

References list
Language Basics. (n.d.). Retrieved from https://docs.mql4.com/basis
Syntax. (2019, March 14). Retrieved from https://en.wikipedia.org/wiki/Syntax

Leave a Reply

Your email address will not be published. Required fields are marked *