My robot gets the volumes wrong, please help
-
Hello
I wrote a robot with a condition
For example, if the moving average is 10, the moving average is 20
If he gives a bullish cross, take a buy position, and if he gives a bearish cross, take a sell positionNow, I want to increase the volume of the next position when the TP hits, and if it stops, the volume will return to the first position
But well, my MetaTrader 5 has become such that when I enter 1 fixed lot, it takes the wrong size of the position

Now I have entered the initial lot number 1 to take the positions fixed with the volume of 1 lot, but it takes like this

When I install the new Metatrader 5, for a short time it gets the volume of transactions correctly, but after several times of testing, it crashes and gets the wrong volumes.
-
Is there no one to solve our problem?
-
I thought I replied to this earlier, you have a couple of choices, place trade using a variable and increase under buy/sell, then reset when needed. Use pink blocks in a separate tree, get the last lot and adjust to increase.
-
I did this too, but it didn't work
-
Can you share the project so we can double check properly please.
-
I uninstall Metatrader and reinstall it. It works fine for a few times when I test it, but after a few times it crashes again.
shared/opKWjdM0e -
@OmidRezazadeh You are using martingale, put running trades only

-
And check the balance amount also
-
It is the same in normal mode Even if I leave the lot fixed, it still selects the volumes like this
-
@OmidRezazadeh this is the backtest of your project as it is

-
Remember to reset "how many losses", don't leave 0
-
reset how many losses=2

-
@ambrogio I run the same project and it imports volumes like this

It has been like this for two days
It's like I save the project, but the Metatrader cache still doesn't recognize this new project -
@ambrogio Thanks dear friend
As you said, I checked the balance
Because the entered balance was low
He used to mistake the volumes like this -
