gab
gab copied to clipboard
Add relational math based dynamic parameters
Relational/inheritance for dynamic parameters.
Basically a new add-on that makes it possible for myParam 2
to inherit it's base value from myParam
.
Samples:
UseMIN:MAX
range
long = 500:1000,200
short = @long/4:@long/2
Just use modifier without range
long = 500:1000,200
short = @long/2
Sample result:
long = 500
short = 250
The benefit of this is that sometimes one want B to be a fraction of A which makes it unnecessary to set a static range.
There's also this obvious problem:
long = 50:500,50
short = 10:100,10
In the above case many runs will become basically useless since if e.g. long and short is SMA values the strategy and run most probably would fail miserably every time short has a higher dynamic value then long.
This could be solved with this new param modifier.
@TODO Find a parsing behaviour that:
- That make the variables as intuitive as possible (may use @ the 'at' sign)
- Deals with any bad strings:
@long / 4
,@long / 4
,@long * 0.2
should work etc.
This is a bit 50/50 since inventing a pseudo-fork of TOML and adding a lot of stuff to it makes less sense. Things such as this could also be coded within a strategy.