Errors, bugs, questions - page 1382

 
Ruslan Khasanov:

Greetings, if you want to parse this code. The archive contains a test class for standard trading operations - Opening, Closing (volume of position to be closed is set in %), Reverse...

and a set of test scripts to demonstrate these functions

Thank you. I will watch it at night.
 
Karputov Vladimir:

For example, like this:

And an example in numbers:

Thank you! It's very simple and concrete. I started to reason in this way somehow, but got bored and ended up with the following method (globals are class variables, it's more convenient for me):

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Выравнивает объём. 
Возвращает корректное значение лота (число в пределах  [lot_min...lot_max], округлённое до шага объёма) 
   в случае ошибки вернёт -1

Использует глобали: 
    lot_step     - шаг лота 
    lot_min      - минимальный лот 
    lot_max      - максимальный лот 
int lot_digits   - кол-во знаков после запятой в lot_step 
    lot_fraction = pow(10, lot_digits); - коэффициент, с которым шаг лота является целым числом
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
double Rv(const double volume_)
{
   if(volume_<=0)
   {
      Alert(__FUNCTION__+":ошибка! Объём оредера или позиции не можеты быть =(",volume_,").");
      return(-1);
   }
   double lot=NormalizeDouble(round(volume_/(lot_step*lot_fraction))/lot_fraction,lot_digits);
   return(fmax(fmin(lot,lot_max),lot_min));
}

Overdid it? Yes? =)))

 

Installed the new Meta Trader 4 for Android,

1 When trying to open demo account on Metakvotes Demo Highlight demo account-connection to Metakvotes chaotically changed demo never opened.

2 When trying to change Metakvots ID in my personal account, when pressing save button absolutely nothing happens, as if the button doesn't work ...

 
Vladimir Pastushak:

Installed the new Meta Trader 4 for Android,

1 When trying to open a demo account on Metacvots Demo Highlight demo account-Connection to Metacvots chaotically changed demo never opened.

2 When trying to change metaquotes ID in my personal account, when pressing save button absolutely nothing happens, as if the button doesn't work ...

1. Still relevant ? What device (nexus 5) ?

2 Describe the steps in more detail. What is your browser ?

 
Alexander:

1. Still up to date ? Which device (nexus 5) ?

2 Describe the steps in more detail. What browser do you have ?

1 Still up to date

2 Change MetaQuotes ID in PC , press save and silence .... Mozilla regularly updated ...


Problem appears in mozilla, everything works in eej ...

 
Vladimir Pastushak:

1 Still up to date

2 I change MetaQuotes ID in the Cockpit , press save and silence .... Mozilla regularly updated ...


The problem appears in Mozilla, everything works in EJ ...

1. Thank you for your feedback, we're working on it.

2. Not playing, write to servicedesk, please.

 
Alexander:

1. Thank you for your enquiry, we are dealing with it.

2. Not playing, please write to servicedesk.

2 Problem with masila, everything worked the first time in ej.
 
Vladimir Pastushak:
2 Problem with mazila, everything worked the first time in ej.
Vladimir Pastushak:

1 Still relevant

Fixed it, try again
 
Alexander:
Fixed it, try again.

Getting a demo account worked fine ...

But the ID change in mazila still didn't work ...

 
Hello. Is it possible under the rules of this site to make EAs and other experts not through the freelance section, but directly, communicating with the customer, and payment also be made directly from the customer's account, to the executor's account?
Reason: