Minimal cost to set the springs to the same length
I am working on the following task:
How to rate the momentum in a stock in the range from -10 to 10, criteria will be volume, over all move, and time it took to make that move(Min)
I am trying to create an indicator using c# which decides the momentum rating based on the last 30 days of minutes data, every bar is 1 min. I want to rate the momentum on a scale of -10 to +10 depending on how fast it is in either direction negative is down and positive is up. I am using ninjatrader for this. right now I am just smoothing the momentum value, but I need better calculation for this. Please help.
“Factorize” non-integer product to chosen number of multipliers from the set
I need to “factorize” some non-integer product to multipliers from the set ([0, 25] with step 0.25). The number of multipliers is chosen (2 to 5). Ideally results should be slightly different each run (and not contain only 1’s with product). The result should be within 0.1 of the initial product.
Nested recipes for list of ingredients algorithm
I possess a list of nested recipes, similar to the example provided below: