[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 164

 
yosuf:
Thanks, although I have to go in by restarting the site, as pointed out by Igor.
If you exit any thread via the To topic list link, the home page updates automatically.
 

Roll:

Создавайте подобную ситуацию на демо -- последовательно загружайте с визуальным контролем ваши коды по золото/долл и евро/долл (индикаторы, советники) до появления "неисправности" для определения названия кода, генерирующего "неисправность".
Признаки "неисправности":
-- "метка свечки";
-- создание "флет-канала" из трендовых линий (пунктир);
-- создание подобных комментов (записей в верхнем левом углу экрана ) ;

The issue is that I have not changed or added any indicators, I have been working with them for three months. The glitch appeared only after switching from timeframe to timeframe and only on 5min and 4hour. I have never traded on my trading platform before 7.09, my timeframes had no problems.

P.S. When creating a new chart without indicators this glitch is already there.

 
granit77:
If you exit any of the threads via the To topic list link, the home page refreshes automatically.
Thank you!
 
Roll:

Perhaps the settings in the external variables of the EA being used have been changed (speaking of telepaths).


I've been trading without an EA. I made only 8 trades in a fortnight. I checked on the duplicate terminal, no such glitches. So it is the terminal that is glitching.

You should probably tear it down if you can't delete it.

 
korsar:


I've been trading without an EA. Only 8 trades in a fortnight. I checked on a duplicate terminal, no such glitch. So it's the terminal that's glitching.

You should probably tear it down if you can't delete it.


It can:
-- if the duplicate terminal functionally replaces the old terminal (will work for a period you define);
-- if the old codes are expensive, the experts, sounds folders of the old terminal need to be archived.
 

Hello.

I have a question: How will the system behave if the Expert Advisor starts to give orders to open trades with a lot calculated to more than two decimal places? Example - 0.3333333. (Service has a min. lot 0.01).

I am considering realization of partial closing/blocking of orders - I have come across this problem. If anyone knows the solution - help me in any way you can.

I do not know how to use it.

 
MODE_MINLOT23Minimum lot size
MODE_LOTSTEP24Step of lot size change
MODE_MAXLOT25Maximum lot size

https://docs.mql4.com/ru/constants/marketinfo

lot sizes are fixed by incremental changes. In the above example, the Expert Advisor will be sent by the terminal itself

ERR_INVALID_TRADE_VOLUME131Incorrect volume
 
splxgf:

lot sizes are quite rigidly fixed in increments. In the above example the EA will be sent by the terminal itself

This is all very informative, of course. But I think I'm not the only one who has faced such a problem, and I would like to hear from people who have solved this problem in their works.

I initially wanted to round such numbers (0.333333) with some mathematical manipulations and int function, but it's too cumbersome.

Please share, at least a verbal description of the solution to this problem, if it exists at all (I suspect that the terminal rounds such numbers by itself, but still - I want to hear from more experienced colleagues).

 
nemo811:

Please share at least a verbal description of the solution to this problem, if it exists at all (I suspect that the terminal itself rounds such numbers, but still - I want to hear from more experienced colleagues).

The terminal itself doesn't round anything, and if you don't do this, you will get an error, as stated above.

Use the NormalizeDouble(lot,2) function

 

To sketch out a function that brings the lot size in order is like two fingers.

The first approximation would look like this

if (vol<minlot) return(minlot) else return(vol-(vol-minlot) % lotstep)

Maybe there are other variants, there are a lot of source EAs with dynamic lot selection.

If the lot step is 0.01 it's good, but there are other variants. ND is not always suitable.

Reason: