[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 492

 
Can you please tell me if it is possible to create a multi-currency Expert Advisor in MT4, so you don't have to set it on every pair separately, but only on one chart.
 
pavel888:
Can you please tell me if it is possible to make a multi-currency Expert Advisor on MT4, so that I would not put it on every pair separately, but only on one chart.

Yes.

 
merkulov.artem:
Good evening! Question, if I use an EA. Will my brokerage company be able to see the algorithm of its work and how it calculates values (indicators, analysis of historical data), i.e. the whole code of the Expert Advisor? Or does the brokerage company receives only information about commands: opening, modification and closing of positions?
No, the DC cannot go into the process of working of the Expert Advisor. The brokerage company server only receives commands from your MT (buy, sell, etc.).
 
guys!!!!!! where can i download a simple MA advisor for crossing 2 lines on the latest data? most of them work on the average line taken from the quotes history. and preferably the same indicator
 
bikrus13:
guys!!!!!! where can i download a simple MA advisor for crossing 2 lines according to the latest data? most of them work on the average line that is taken from the quotes history. and preferably the same indicator
What do you mean by "recent data"? The latest data is what. Not from the history, but from the future?) What is the latest data? Just curious - this is the first time I've "heard" of it.
 
kakin:
What do you mean by "latest data"? What is the latest data? Specify. Just curious - this is the first time I've "heard" of it.

For example, if you delete the history from the terminal completely. when you open a chart, you have to create your own history by scrolling back into the past. in this case, the average component starts from zero on which date the history started. it's about two months. if you take MA with a period of 1000 in the one-minute chart with a week and a month history, they will differ. that's the problem. if you create an indicator based on the latest quotes data, it will show more truthfully
 

Can you tell me if it is possible to prohibit the EA from sending printers at the right moment on a demo chart? Maybe even by removing it from the chart. I think this function will not stop it completely, only till the next tick, or will it stop? BreakPoint();

void BreakPoint(){//if (!IsVisualMode()) return(0);
keybd_event(19,0,0,0);
Sleep(10);
keybd_event(19,0,2,0);}                    
 
Apparently it won't stop it, but is it even possible to remove the robot from the chart programmatically at the right moment?
 
bikrus13:

For example, if you delete the history from the terminal completely. when you open a chart, you have to create your own history by scrolling back in time. the average component starts from zero on which date the history started. it's about two months. if you take a MA with a period of 1000 in the one-minute chart with a week and month history, they will differ. this is the problem. if you create an indicator using the latest quotes data, it will show more truthfully
))))))))) my only advice is to read on the Internet about the dreaded moving average and how it's calculated. Make an emphasis on studying the averaging period. I know it's very hard on the brain, but a lot of questions will go away on their own.
 

I am currently learning how to write one EA in terms of understanding the source code, as the EA is written very well.

But one thing is strange there.

void FindOrders()
{
// - 1 - == Инициализация переменных перед поиском ======================================
   int total = OrdersTotal() - 1;
   g_type = -1;                                    // На текущий момент у нас нет позиций
// - 1 - == Окончание блока =============================================================
 
// - 2 - == Непосредственно поиск =======================================================
   for (int i = total; i >= 0; i--)                // Используется весь список ордеров
      if (OrderSelect(i, SELECT_BY_POS))           // Убедимся, что ордер выбран
         if (MathFloor(OrderMagicNumber()) == i_magicNumber &&// Ордер открыт
             OrderSymbol() == Symbol())            // ..экспертом, который прикреплен к..
         {                                         // ..текущей паре
            g_ticket = OrderTicket();              // Запишем данные ордера
            g_type = OrderType();
         } 
// - 2 - == Окончание блока =============================================================
}

Why is the number of all orders assigned toOrdersTotal() - 1, and not justOrdersTotal()?

Because if we have 0 orders in total, then the value of total will be -1 instead of 0.

Reason: