[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 532

 
Pyro:
Thank you, it's a simpler solution than I've conjured up))
 
tol64:

I don't do it on purpose.))
It turns out to be a relative concept.) Balance is fixed gains/losses. And it's real. Funds, AccountEquity(), can still change as many times as you like and this is in principle also real, but already quite vague. Of course, we should not increase the critical value of our account and control the deposit load and risk away from stop out and margin percentage. Such an example has already been given above. The same "kamikaze")))

In that case novicek should have been more specific and used clear definitions such as Balance/Equity (clear) rather than Real/Unreal (vague). Would the example below work for you then?

For me, AccountEquity(), as an unformed candle and other indicators that interest me, I calculate on the balance, but of course, I also follow the means, to be aware of when Equity (means) should be converted into real or virtual (if it is a test) money, i.e. balance. ))

just what I was looking for
where can i download?

P.S.
Sorry I didn't phrase it right

 

Hi all,

(while we are designing the ES I wrote above)

Have there been any facts of registering multiple trading accounts with one DC and implementing the following:

1. have any extreme MTSs been set up on one DT ? (assuming 1 MTS for one account) ... (seems like dealer welcomes opening any number of accounts)

2. I'm not interested in integration of several trading algorithms in one greedy EA.


That is, if it's not difficult, write the list of diametric MTS, if there is one. Your view of diametricity is interesting.

If not, then no.

One of our research implies simultaneous start of several extreme MTS in one DC in different accounts (and simultaneous termination of their work, of course). If this has been done before, please provide a link to the result or a discussion of the crash. Interested in observation and modest analysis. It would be unpleasant if for the sake of these tests - we run our own "test office" ))) if there is information - please share. Simply without your support we will not tell you how low we have fallen in our history of research and you will not have a reason to grin at us )))

P.S. As I wrote earlier - we are interested in solving an applied problem - "hard plus". What we actually brainstorming lately. And then everything else.

 

I noticed in Nikolay Kositsin's article(https://www.mql5.com/ru/articles/1516) that indicator values are loaded into buffers.

//----+ ВЫЧИСЛЕНИЕ ИНДИКАТОРНЫХ ЗНАЧЕНИЙ И ЗАГРУЗКА ИХ В БУФЕРЫ        
  for(bar = 1; bar <= 3; bar++)
      Mov[bar - 1] = iCustom(NULL, Timeframe_Dn, "JFatl", Length_Dn, Phase_Dn, 0, IPC_Dn, 0, bar);
           
           //----+ ОПРЕДЕЛЕНИЕ СИГНАЛОВ ДЛЯ СДЕЛОК
           dMov12 = Mov[0] - Mov[1];
           dMov23 = Mov[1] - Mov[2]; 
                                           
           if (dMov23 > 0)
              if (dMov12 < 0)
                       SELL_Sign = true;
                          
           if (dMov12 > 0)
                       SELL_Stop = true; 

I think that this approach of using indicators in Expert Advisors will be more resource-efficient than this one:

Mov_1 = iCustom(NULL, Timeframe_Dn, "JFatl", Length_Dn, Phase_Dn, 0, IPC_Dn, 0, 1);
Mov_2 = iCustom(NULL, Timeframe_Dn, "JFatl", Length_Dn, Phase_Dn, 0, IPC_Dn, 0, 2);
Mov_3 = iCustom(NULL, Timeframe_Dn, "JFatl", Length_Dn, Phase_Dn, 0, IPC_Dn, 0, 3);


Is my assumption correct or is the second option identical to the first?

 
novicek:
exactly what i was looking for
P.S.
Sorry for the error of phrasing.


In principle you have formulated it correctly, and I just do not understand.) You wrote the numbers as well:

amount of money in the account = 10000
amount of money with leverage = 10000
sum of real money = 100

The figures show that the account has 10,000 in balance and 100 left in equity. Extreme))

 
novicek:

where can I download it?

Your editing of the post might not have been noticed. )) It's pretty easy to write, try it based on the example below. The script shows the current balance and equity in the top right corner. This is a static version. The function may be developed and called in Expert Advisor to update it by ticks.

   int    Y_pxls     = 10;
   int    X_pxls     = 10;
   int    n_X_pxls   = 70;
   int    corner     = 1;
   int    size_font  = 7;
   color  basic      = White;
   string font       = "Arial";
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//---------------------------------- ИНФОРМАЦИЯ ТОРГОВОЙ СИСТЕМЫ -----------------------------------------//
//--- Names

   //--- Баланс депозита
         ObjectCreate("Account Balance",OBJ_LABEL,0,0,0);
         ObjectSetText("Account Balance","Account Balance ($) =",size_font,font,basic); 
         ObjectSet("Account Balance",OBJPROP_CORNER,corner);
         ObjectSet("Account Balance",OBJPROP_XDISTANCE,n_X_pxls); 
         ObjectSet("Account Balance",OBJPROP_YDISTANCE,Y_pxls*2);

   //--- Текущие средства
         ObjectCreate("Account Equity",OBJ_LABEL,0,0,0);
         ObjectSetText("Account Equity","Account Equity ($) =",size_font,font,basic); 
         ObjectSet("Account Equity",OBJPROP_CORNER,corner);
         ObjectSet("Account Equity",OBJPROP_XDISTANCE,n_X_pxls); 
         ObjectSet("Account Equity",OBJPROP_YDISTANCE,Y_pxls*3);

//--- Values
         
   //--- Баланс депозита
         ObjectCreate("Value Account Balance",OBJ_LABEL,0,0,0);
         ObjectSetText("Value Account Balance",""+DoubleToStr(AccountBalance(),0)+"",size_font,font,basic);
         ObjectSet("Value Account Balance",OBJPROP_CORNER,corner);
         ObjectSet("Value Account Balance",OBJPROP_XDISTANCE,X_pxls);
         ObjectSet("Value Account Balance",OBJPROP_YDISTANCE,Y_pxls*2);
   //--- Текущие средства
         ObjectCreate("Value Account Equity",OBJ_LABEL,0,0,0);
         ObjectSetText("Value Account Equity",""+DoubleToStr(AccountEquity(),0)+"",size_font,font,basic);
         ObjectSet("Value Account Equity",OBJPROP_CORNER,corner);
         ObjectSet("Value Account Equity",OBJPROP_XDISTANCE,X_pxls);
         ObjectSet("Value Account Equity",OBJPROP_YDISTANCE,Y_pxls*3);
//----
   return(0);
  }
 
Maxaxa:

Hi all,

...

P.S. As I wrote earlier - we are interested in solving an applied problem - "hard plus". That's what we've been brainstorming lately. And then everything else.


Do you have to open several accounts for that? You can just run several Expert Advisors on one account. If you need a certain instrument, you open several windows with this instrument and run your EA everywhere. The Magic_Number parameter should be in the external parameters, and a different number is set for each Expert Advisor.
 

I'm not a novice programmer, I've been rewriting an indicator from another language and I've stumbled on overdrawing. Please correct it and show me where the error is.

Files:
i_asi_total.mq4  14 kb
 
tol64:

Is it really necessary to open several accounts for that? You can just run several Expert Advisors on one account. If you need a certain instrument, you can open several windows with this instrument and run your EA everywhere. The Magic_Number parameter should be in external parameters, and a different number is set for each EA.

Well, that's to the question of "greedy" experts ))

You're right, but it's all just for the purity of the experiment, at least.

I(we) have several real accounts besides different demo ones (more than a few))) The DCs behave differently at all, not that different pictures, - different dynamics. As for NDD accounts - great for me anyway. Oh... and how much we've already lost on real weekly tests, it's a pardon the horror... time to open an elk farm ))

But maybe this will work, let's see )))

 

Dear, I am testing an EA in the tester and the log shows error 138. I mean, the tester generates requotes? I suspect that I have an error somewhere in this part of the code

   if (CloseOnFriday == TRUE && DayOfWeek() == Friday_Days && Hour() > HourStopSession && AccountEquity_>AccountBalance_) {
               RefreshRates();
               OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Orange);
            }
If there is indeed an error, please advise what is wrong?
Reason: