I did some work around for myself. it doesn't take lots into account but your account equity, leveraged.
I made a constant named init_vol and a variable named init_vol2
on my buy/sell blocks I clicked the variables button in the upper right corner and put this into the white circle which means it will be executed as soon as the block is, before the block does it's thing.
DynamicLots(Symbol(), "block-equity", init_vol)
DynamicLots() is a custom function created by fxDreema.
Symbol() will use the current Symbol for price. "block-equity" is what calculation I want and init_vol is the number to use in that calculation
then put init_vol2 as your initial volume.
I have the same for add on win and add on loss.
so if you put 30 in init_vol constant it will use 30% of your equity on the initial volume. and if you put 10 on adds it will add 10% of your equity on wins/losses.
this will calculate it's value on every run of the block meaning it will increase/decrease with every trade.
and the initial volume is only used after a reset.
of course this is just an example and you can change it to fit your needs.
look through the code of your .ex5 to see what you can use that's already made inside. fxdreema did an awesome job.
you can message me if you need any more help.