With the molanis software you can create a code through a visual diagram. They have an option to increase or decrease the percentage of the actual positions according to the result of the previous operation (if this was successful or not / gains or losses). They have a paid service that reveals the code, but I do not have it.
Somebody can copy and paste the code for that part, and explain it if necessary?
Thanks in advance.