Function to start a EA - page 2

 
fxsaber:

I do not have enough knowledge of English to explain intelligibly.

You can try in Russian, I will use a translator (here or in private). I am interested.

 
Alain Verleyen:

You can try in Russian, I will use a translator (here or in private). I am interested.

Есть некоторая особенность русского (прилагательное, не существительное) менталитета, которая, скорее всего, не всегда понятна людям другой культуры.

Возможно, из-за этого в данном случае возникло смешанное чувство, когда требуется удовлетворить два противоречивых желания - поступить грязно, но при этом не упасть в грязь перед самим собой.

Бывают вещи, которые невозможно объяснить. Их либо понимают сразу, либо не понимают никогда.

Сомневаюсь, что авто-переводчик в состоянии передать не сильно тонкие моменты моего косноязычия. На сим закончим.

 
fxsaber:

Есть некоторая особенность русского (прилагательное, не существительное) менталитета, которая, скорее всего, не всегда понятна людям другой культуры.

Возможно, из-за этого в данном случае возникло смешанное чувство, когда требуется удовлетворить два противоречивых желания - поступить грязно, но при этом не упасть в грязь перед самим собой.

Бывают вещи, которые невозможно объяснить. Их либо понимают сразу, либо не понимают никогда.

Сомневаюсь, что авто-переводчик в состоянии передать не сильно тонкие моменты моего косноязычия. На сим закончим.

Ok it seems it will lead nowhere.

 

Back on topic...

#property script_show_inputs
input string Path = "Advisors\\"; //Path inside of the experts folder
input string Name = "ExpertMACD"; //Name of expert (no extension)

void OnStart()
{
   string xml   = "<chart>\r\n<expert>\r\n";
   string right = "\r\n</expert>\r\n</chart>";
   string _name = "name="+Name+"\r\n";
   string _path = "path=Experts\\"+Path+Name+".ex5\r\n";
   string _mode = "expertmode=1";
   string file  = "LaunchExpert\\temp.tpl";
   xml+=_name+_path+_mode+right;  
   int h=FileOpen(file,FILE_WRITE);
   FileWriteString(h,xml);
   FileClose(h);
   ChartApplyTemplate(ChartOpen(_Symbol,_Period),"\\Files\\"+file);
}
 
nicholishen:

Back on topic...

#include <fxsaber\Expert.mqh>

void OnStart()
{
  // Path to the Expert Advisor
  MqlParam Params[] = {{TYPE_STRING, 0, 0, "Experts\\Advisors\\ExpertMACD.ex5"}};

  // Launching the Expert Advisor on the current chart
  EXPERT::Run(0, Params);
}
 
Alain Verleyen:

Just found this while making some researches on Russian forum :

From Metaquotes CEO (Renat Fatkhullin) talking about fxsaber code. 

Strange to see you, Alain, arguing your point with this man's words. I know your position about MQ, and the referenced phrase was just am implicit confirmation that fxsaber made something useful (many times) which MQ should do in the new platform from very beginning and natively, but did not do, and still denies the need, just because of their idiosyncrasy.

 
Stanislav Korotky:

Strange to see you, Alain, arguing your point with this man's words. I know your position about MQ, and the referenced phrase was just am implicit confirmation that fxsaber made something useful (many times) which MQ should do in the new platform from very beginning and natively, but did not do, and still denies the need, just because of their idiosyncrasy.

Strange ? Renat is totally right on this point, I agree 100% on his specific point. And this topic has nothing to do with MQ work. It's a pity I can't talk directly with fxsaber due to language issue, otherwise I would say it directly my opinion. I didn't deny the work of fxsaber, I learnt from it, that's not the point. 

Everyone is free to code as he likes. However, my opinion is, when you post code publicly, you have a responsibility, you don't post for you, you post for others. And fxsaber code is most of the time unreadable even for experimented coders.

I am also wondering why he is doing all this work ? Can you say it ? He is obviously investing a lot of time.

I like quality, in all aspects. That's why I am very critical against Metaquotes, and against all coders posting code on this site, like fxsaber or nicholishen.

 
Alain Verleyen:

Everyone is free to code as he likes. However, my opinion is, when you post code publicly, you have a responsibility, you don't post for you, you post for others. And fxsaber code is most of the time unreadable even for experimented coders.

I am also wondering why he is doing all this work ? Can you say it ? He is obviously investing a lot of time.

I like quality, in all aspects. That's why I am very critical against Metaquotes, and against all coders posting code on this site, like fxsaber or nicholishen.

Hm, do you mean you prefer fxsaber would not publish his works as open source but instead as commercial products just because his style is other than yours?

He just shares his work. He did not even write an article (which would definitely require better styling, but which is actually lacking in many other people's articles). And since the works are open source you (and others) are free to re-factor it as appropriate and get a required level of quality (there are lot of examples in the codebase that the same code has many incarnations).

IMHO, MQ's default style (and thus the Standard Library) is equally unreadable as fxsaber's macro's. ;-) But I can understand that the macros spare a lot of time for fxsaber's coding - and this is the answer to your question regarding time investing.

 
Stanislav Korotky:

Hm, do you mean you prefer fxsaber would not publish his works as open source but instead as commercial products just because his style is other than yours?

I mean I would prefer his code would be readable in some minutes and not in hours. I don't want him to use my style, I don't care about that. It's about quality, not style, sorry if I am not clear.

He just shares his work. He did not even write an article (which would definitely require better styling, but which is actually lacking in many other people's articles). And since the works are open source you (and others) are free to re-factor it as appropriate and get a required level of quality (there are lot of examples in the codebase that the same code has many incarnations).

Of course it's not specific to fxsaber. But fxsaber is a very good coder, that's why I talk about him and not about all others.

IMHO, MQ's default style (and thus the Standard Library) is equally unreadable as fxsaber's macro's. ;-) But I can understand that the macros spare a lot of time for fxsaber's coding - and this is the answer to your question regarding time investing.

Honestly I don't know why you are arguing with me, when your main critic against nicholishen for example was about his style. I am just saying similar things about fxsaber.

Anyway, I am accustomed that people don't care about quality, but I am surprised you don't agree with me about that. If someone want to criticize MQ about their work, it has to be irreproachable on quality, otherwise as the link I posted above demonstrate, it's easy for them to avoid the main point by focusing on "with an overhead, written disgustingly and unreadable".

Forum on trading, automated trading systems and testing trading strategies

Using static class members to instantiate an object of itself, within itself, without creating a stack-overflow?

Stanislav Korotky, 2017.07.27 22:31

Your code is full of nuances which are sitting just inside your head. Good code is easy to read and easy to support for many people except you.

Despite the fact the code is "small", it's so intensively littered with pitfalls that it needs large work for refactoring. Sorry, I'm not interested to do it. Most things I do I do because I like them, not for money.

What you're asking for is codereview. There are places in the net dedicated for this routine, which could be probably more helpful for you if you code in general purpose language such as C++. You can port your code to C++ and get wider audience and response. In any way you should be prepared that your code can be criticized. I understand you want to get some specifics, but let it be someone else, I see strageness on almost every line, so the story would become a very long one and somewhat useless. If it can make your life easier, just ignore my opinion.


P.S.1: Please note that I never said or think that my own code is perfect, anyone it free to criticize it, I am open.

P.S.2: This is not about individuals, it's about coding quality. So fxsaber, nicholishen, and Stanislav, don't take it personally.

P.S 3: I removed by previous comment about EXPERT, to avoid confusion between style and quality. Maybe I will need to write in full what I mean by quality from an analyse of published code but it's time consuming and I am not motivated to do that.

 
Stanislav Korotky:

...

IMHO, MQ's default style (and thus the Standard Library) is equally unreadable as fxsaber's macro's. ;-) But I can understand that the macros spare a lot of time for fxsaber's coding - and this is the answer to your question regarding time investing.

It's not about style !!! The main problem of the Standard Library is not style, that doesn't really matter, it's very subjective. The main problem of SL is QUALITY, I don't use it because :

1° It's buggy.

2° It's very difficult to use and understand it without analyzing the internal code. Is that OOP ?

3° Point 2 could be avoided with a good documentation. Such documentation doesn't exist.

4° It's very difficult to add something which is not provided. Did you already try to add new features to EA build with MQL5 Wizard. It's a hell. (If someone comes here to say it's easy, I will ban him  - just joking in case someone will take at 1st degree).

... 

Nonetheless there are interesting ideas in the SL.

Reason: