Was hoping to get some help on a conceptual idea. I understand that currently there is no way to increment user variables within the strategy builder.
How about we write a simple indicator that holds the increment value for a nominated user variable which can then be assigned to the user variable once a condition is matched in the strategy builder? This could also be used to plot user variables easily.
Pseudo code:
Incrementor (string variabletoincrement, double incrementAmount) {
var currentVarValue = application.eval(variableToIncrement)
Plot1 = currentVarValue
var incrementedValue = currentVarValue + incrementAmount
Plot2 = incrementedValue
return = incrementedAmount
}
Does this look like a feasible approach to achieving an incrementing approach in strategy builder?
Thinking about it more I think it boils down to the eval function and returning the current value of a given user variable (the name of which is passed to the indi as a string). The ootb offset function on every indicator could take care of the increment.
Feedback would be great before committing more time on this...
Comment