Size:
Color:
Hi Alexandre,
Sorry, this is not my bread and butter. I don't know what these "tanh-estimators" are all about. So the answer to "is this possible" depends on your coding skills. If it presents difficulty you could try hiring a programmer with experience in this field.
Size:
Color:
Size:
Color:
I can help give me a few minutes and i'll send the c# for tanh.
Size:
Color:
The syntax in c# for tanh is below. The constant terms in the equation are tricks for improving neural nets:
CODE:
Please log in to see this code.
You would need to find out how to call the .Net tanh function in WealthLab, but it is a C# math function, so maybe only the "Math." needs to be dropped.
Size:
Color:
Math is part of System, no need to include anything. However, it does not seem to work as expected:
CODE:
Please log in to see this code.
Size:
Color:
You would need to "
mean-zero standardize" the close prices over the lookback bars. If you can generate a single double called e.g. "avg" that is equal to the average of all close prices over the lookback bars, and get the standard deviation "sd" of close price over the same lookback bars, you would then need to create a DataSeries called Z using something like:
CODE:
Please log in to see this code.
which should work. The trick is that the input series to tanh needs to be centered at zero with preferably half the values of the transformed close prices above zero, and half below. You might have to detrend the data, since I typically do that for cycle analysis of close prices.
Size:
Color:
Here is a plot similar to what Close_tanh should look like (basically a sigmoidal s-curved function with a min of -1 and max of 1). Tanh is a common transform for inputs into neural nets.
Size:
Color:
For what it's worth:
CODE:
Please log in to see this code.
Size:
Color:
That looks good and it checks out when charting, so the OP is addressed. For the OP request, one must realize that the mean and sd of Close go all the way to bar 0, so if all the chart's data were going to be required it would be appropriate to use the existing code. However, the look back bars could also be decreased if the entire Close array was not required (obviously).
Size:
Color: