Write an advisor - page 5

 
STARIJ:
It's just remembering how to learn programming, which language to start with

You should start learning in the language you plan to write in and not go through the back door.

 
Maxim Romanov:
There are a lot of subtleties in programming. If you write primitive EAs for the Strategy Tester, you do not need to know programming. And if you write a complex Expert Advisor for the real trading robot, the problems will begin, and here we will have to optimize the speed and everything, in general, know the programming at a high level. It depends on what objectives are set. But everything can be learned if you have the necessary desire.

To be completely fair, there is not much difference in terms of programming between "simple" and "complex" EAs. The difference is in the amount of code - no more than that.

Another matter is that in order to implement an EA "competently", one must know the rules of order execution, terminal features, broker's conditions, etc. This is not the skill of the programmer, but the trader's experience. If the problem is solved correctly, any inexperienced programmer will be able to implement it.

 

You've got the man's head screwed on. The help is full of examples, the kodobase is full of examples - take any example and learn how it works. Twenty of them are taken apart - the twenty-first one you can start writing yourself.

 
First, learn BASIC.
 
Alexander Ivanov:
First, learn BASIC.

M.M. Botvinnik once called a computer an idiot. So before you can learn to program, you have to learn how to communicate with an idiot. You must learn to explain in such a way that even an idiot understands what he's being asked to do. And the language documentation will tell you the rest.

 

You don't need to know programming.

Start by making simple scripts. Ask for the number of bars in the window, item size, etc... You just need to understand how each function works, and then it will become easier.

For example:

void OnStart()
  {
//---
int bars= Bars(_Symbol,_Period);  
Alert("bars=",bars); 
  }
//+------------------------------------------------------------------+
 
10 INPUT A
20 PRINT A
30 IF A=0 THEN GOTO 10
 
Alexander Ivanov:
10 INPUT A
20 PRINT A
30 IF A=0 THEN GOTO 10

I will show you just one line from VBA. Tell me how much it differs from C++ or mql, can you understand it?

Select Case Ed0:
 Case 1:
  Rub = "рубль ":
 Case 2, 3, 4:
  Rub = "рубля ":
 Case 5, 6, 7, 8, 9, 0:
  Rub = "рублей ":
End Select

If your knowledge of BASIC is limited, it doesn't mean you can't write anything in that language.

You can criticize mql with such an approach, like you can't write a toy in 3D, it means it's a bad language...

 

RUN

 
Do not listen to anyone, including me, if you want to write an advisor, take it and write it, and as you go along you will understand whether you need it or not, because you cannot learn anything without having any goal, and if you have a goal, you can learn everything. In any programming language the approach is the same everywhere - variables, formulas for numbers and strings, loops, arrays and all. There is nothing difficult in principle, all it takes is time, desire and brains/ability.
Reason: