TURNING A MONEY MANAGEMENT SEQUENCE INTO A LOOP AFTER A MAXIMUM LOT SIZE IS REACHED.
-
-
@kestra Now you need to position the first variable in its position here:

However, we need to consider if buys and sell will always share the same lot size value. Will it happen of they can have different values?
-
@l-andorrà If the signal is buy we start with 0.02. The same thing for sell. But when the direction changes from buy to sell we use our next sext sequence 0.05, and the next opposite direction will be 0.11 until will get to the last lot, then it will return to 0.02.
-
Correct, this is why you need all those variables. You will store the value of the next variable into the previous one. You can also use a counter variable controlling that, but it would make it more complex.
-
@l-andorrà How will i store the value of the next variable into the next one. Do you mean i will build another buy and sell block and put the next variable into it.
-
@kestra I think this is a much better approach. You need one variable only and every time a trade is open, the next value is updated like this:
https://fxdreema.com/shared/kzsi04vOd
I used the first 2 values of the lot size, you will need to extend the structure as much as you need.
-
@l-andorrà Let me explain how the structure you built will work, if am correct tell me. After buying with the initial lot which is 0.02, if the current trade is 0.02 lot change the internal variable to 0.05 so that the next trade will be 0.05 or else if the current trade is 0.05 lot change the internal variable to 0.11 so the next trade will carry 0.11 lot. am i correct ?
-
@kestra Yes, that is correct. You can add as many intermediate lot size levels as you need.
-
@l-andorrà but the internal variable will be left empty and will be modified only using the modify block, right ?
- If in any case a value is put into the variable just as we wanted to build before can it be modified using the modified block when a value is already in the variable ?
-
It will never be empty. The variable will always have a value in it. And yes, that block will automatically change the value of the variable overwriting it on top of the previous one.