[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 407

 
Vinin >>:

Чему равно Pr2?

Наверно надо распринтовку значений делать просто.

Put in the beginning of double Pr; removing =0

What is pinning? And how to do it. :(

 
Nail_Saby писал(а) >>

Put in the beginning of double Pr; removing =0

What is pinning? And how to do it. :(

Just print the value of interest via Print.

 
Nail_Saby писал(а) >>

Done, Pr2 shows the difference between StartBalance and AccountEquity. The log constantly reports it is increasing

2010.01.29 11:49:58 2009.01.26 08:19 eGerat v 3.1.4 Duos EURUSD,M1: Funds have increased. Closing it all!!!
2010.01.29 11:49:58 2009.01.26 08:19 eGerat v 3.1.4 Duos EURUSD,M1: Pu2 = 878.3527

Do you save the new state of StartBalance in the global variables when you open new positions?

 
Vinin >>:

А ты при открытии новых позиций сохраняешь новое состояние StartBalance в глобальных переменных?

I only save in the init function. Do I need to write it in start as well?

I found the error, I had a stash, part of the balance was set aside, so I had to write

Pr2=AccountEquity()-StartBalance-Balance;
Now it's working, but again not exactly what I wanted:

Parameter set ProcentToclose doesn't hold, the closing goes on an unknown algorithm.


ProcentToclose set = 0.5
 
Nail_Saby писал(а) >>

I only save in the init function. Do I need to write it in start as well?

I found the error, I had a stash, part of the balance was set aside, so I had to write

Pr2=AccountEquity()-StartBalance-Balance;
It is working now but not quite as I wanted it to be:

Parameter set ProcentToclose does not hold, closing goes on an incomprehensible algorithm.

ProcentToclose set = 0.5

It must be necessarily saved when opening a new position. If we open a series of positions, then before the first one in the series

 
Vinin >>:

Обязательно нужно сохранять при открытии новой позиции. Если же открывается серия позиций, то перед первой в серии

Does GlobalVariableDel need to be applied? Or does the new entry erase the old one?

 
Nail_Saby писал(а) >>

Does GlobalVariableDel need to be applied? Or does the new record erase the old one?

The new record will overwrite the old one. There is no need to delete it. But it is desirable to clear the global variable

 

Hello, friends.

Please advise which software to check, test, analyse trading strategies?

(For correctness, in order to avoid advertising), write in a private).

Thank you very much in advance.

 

Good afternoon

Can anyone tell me why the attached piece does not identify the order type?

In the order list type = 0, error number outputs =0

for (int n_pos= 0; n_pos< OrdersTotal(); n_pos++) 
             {
             if (OrderSelect( n_pos, SELECT_BY_POS, MODE_TRADES)) 
              {
               if ( OrderType()==0)
                  Alert ("OrderSelect() вернул ошибку - ",GetLastError());  
                else
                {
                  int TipOrd = OrderType();                       
                  Alert( n_pos+" Ордер выбран.Тип ордера ="+ TipOrd+ "Цена открытия= "+OrderOpenPrice()+". Всего их = "+OrdersTotal());                                    
                  if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic_N) 
                   {
                      if (OrderType()==OP_BUY)
                        Ticet_No  = OrderTicket();
                   } //конец совпадения пары 
                }   //конец выбора ордера 
               } 
             }  //конец цикла
 
Vekker >>:

Добрый день

Кто подскажет почему прилагаемый кусочек не определяет тип ордера?

В перечене ордеров тип = 0, номер ошибки выводит =0

error 0 is no error, when you have an OP_BUY order, it follows the branch with an alert, so if there is no error, it shows that there is no error

Reason: