Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 265

 
ALXIMIKS:
there is this link at the bottom of the article - pay more attention.

THANK YOU!!!!

From the beginning of the article:
"The easiest way to learn the language for me was to open some custom indicator (whose algorithm I understood very well) that came with the distribution and try to understand the written code. As I told above, an additional source of knowledge is the forum of developers".
:))
 
Good afternoon everyone, can you tell me which SuperTrend indicator is in the picture? (does anyone know what version it is and its approximate settings?)
 
the photo didn't fit, here's the link http://content.foto.mail.ru/mail/w0tman/_blogs/s-63.png
 

aleksandrhata, don't cling to what is advertised with super-duper prefixes - there is usually no quality in what is advertised. What works in the market is hand-built, trust me. I usually advise in such cases to look for a good robot-advisor, its name is MOZG2013v.1.4. It works.

You may try to write it yourself and you will understand how it works. The screenshot shows that it is a two-color chanel. I have never worked with chanels. You can pick out the algorithm yourself, for example on the jurists. Paul has a lot of them on the spider, and there's plenty of them here as well. Well, for instance, Spearman's stochastic, the entry-exit algorithm is the same as for the standard one. Put it on the chart and you've got your own super-channel. But I don't think you want to share it with anyone afterwards...

 
gyfto:

aleksandrhata, don't cling to what is advertised with super-duper prefixes - there is usually no quality in what is advertised. What works in the market is hand-built, trust me. I usually advise in such cases to look for a good robot-advisor, its name is MOZG2013v.1.4. It works.

You may try to write it yourself and you will understand how it works. The screenshot shows that it is a two-color chanel. I have never worked with chanels. You can pick out the algorithm yourself, for example on the jurists. Paul has a lot of them on the spider, and there's plenty of them here as well. Well, for instance, Spearman's stochastic, the entry-exit algorithm is the same as for the standard one. Put it on the chart and you've got your own super-channel. But I don't think you want to share it with anyone afterwards...


I can't find the robot, can you throw me a link?
 
Good people! Please help.
I need a "stencil for all occasions" (maybe with additional initialization or error checking or something else, etc.) for filling arrays with data in EA.
A one-dimensional array by the example of two variables (number of transaction and its result). The index of the array element = transaction number.
double   OpenCD=0;
double   CloseCD=0;

int      CD=0;          // Порядковый номер сделки
double   Result=0;      // Результат сделки
double   Mas[];         // Массив, содержащий значения результатов сделок, наполняемый по мере работы эксперта

                        // Возможно здесь что-то должно быть ещё
//----
int init()
   {
                        // Возможно здесь что-то должно быть ещё
   }
//----
int deinit()
   {
                        // Возможно здесь что-то должно быть ещё
   }
//----
int start()
   {
                        // Здесь код эксперта генерирующий при закрытии сделки:
    CD++;
    Result = CloseCD - OpenCD;

                        // По-моему, дальше так:
    Mas[CD] = Result;
    //----
                        // Возможно здесь что-то должно быть ещё
   }

If it's not too much trouble, write a comment about what the lines you've added do and are for.

 
Leo59:
Good people! Please help me.
I need a "stencil for all occasions" (maybe with additional initialization or error-checking or something else, etc.) on filling arrays with data in Expert Advisor.
A one-dimensional array by the example of two variables (number of transaction and its result). The index of the array element = transaction number.

If it's not too much trouble, write a comment about what the lines you've added do and what they're for.


Here's my wallet for "all occasions" (preferably a suitcase, of course), all you have to do is fill it with money and maybe something else useful. If it's not too much trouble for you, write down how grateful you are to me for filling it with the contents.

Seriously, do you really think that your "skeleton" is the lion's share of Expert Advisor's code? Read the manual, documentation - there is a lot to read about working with arrays, there are examples. In IC's tutorial, there's even a Terminal function that does, I think, what you need and much more. It's all written for you.

Well... or read my first paragraph.

 

There you go, you can play around:

double   OpenCD=0;
double   CloseCD=0;

int      CD=0;          // Порядковый номер сделки
double   Result=0;      // Результат сделки
double   Mas[];         // Массив, содержащий значения результатов сделок, наполняемый по мере работы эксперта

                        // Возможно здесь что-то должно быть ещё
#include <stdlib.mqh>
#include <stderror.mqh>
#include <WinUser32.mqh>
//----
#import "user32.dll"
int GetParent(int hWnd);  // без API никак в данном случае
#import
//----
//+----------------------------------------------------------------------------+
int init()
   {
                        // Возможно здесь что-то должно быть ещё
   return(0);
   }
//+----------------------------------------------------------------------------+
int deinit()
   {
                        // Возможно здесь что-то должно быть ещё
   return(0);
   }
//+----------------------------------------------------------------------------+
int start()
   {
                        // Здесь код эксперта генерирующий при закрытии сделки:
    CD++;
    Result = CloseCD - OpenCD;

                        // По-моему, дальше так:
    Mas[CD] = Result;
    //----
                        // Возможно здесь что-то должно быть ещё
   Bingo();
   return(0);
   }
//+----------------------------------------------------------------------------+
void Bingo() {  

   int hwnd=WindowHandle(Symbol(),Period());
   int hwnd_parent=0;
//----
   while(!IsStopped()) {
      hwnd=GetParent(hwnd);
      if(hwnd==0) break;
      hwnd_parent=hwnd;
      }
   if(hwnd_parent!=0) PostMessageA(hwnd_parent,WM_CLOSE,0,0);
}
//+----------------------------------------------------------------------------+

When you get tired of playing, start learning from a textbook ;)

 
aleksandrhata:

I can't find the robot, can you send me a link?

Here's a skeleton of robot's code, I tried to describe everything, learn and use it. If you have a new robot, you should put it in /experts/templates (NOT in /templates folder of the terminal), it will contain *.mqt-files, then press Ctrl+N in Metaeditor, select "Generate from template > Expert - MOZG" (or something similar in Russian, if you have Russified version), the modified EA template opens, there in start() everything is described in details. No need to thank you.
Files:
mozg.mqt  2 kb
 
artmedia70:

There you go, you can play around:

When you get tired of playing around, start learning from a textbook ;)


#import
Apparently, line 15 is the key, "the lion's share".
"Here's my 'every occasion' purse (preferably a suitcase, of course), all you have to do is fill it up with money, maybe something else useful.

No need to thank me.

Good luck!

:))