- ago
Thank you very much for your effort to program the long side in c#. This works and I'm trying to get into C#.

I have another question about the "MathIndOpInd" indicator. I wanted to calculate the following for the single symbol SPY:

Buy if Close / SMA(2, Close) > 1.2

The values โ€‹โ€‹โ€‹โ€‹of SPY according to WL:
9/9/22: 406.60
9/8/22: 400.38

My calculation on paper would look like this:
SMA (2) = (406.60 +400.38 ) / 2 = 403.49
406.60 / 403.49 = 1.016

So no purchase.

However, WL gives me a buy signal for today. The result in WL is 30.14

How does WL calculate and how do I manage to implement the above with the building block strategy.
THANKS!




0
539
Solved
2 Replies

Reply

Bookmark

Sort
- ago
#1
Clearly the ratio is incorrect. On your screenshot the denominator (second series) appears to be StdDev rather than the SMA:

Close/StdDev(Close,20,StdDevCalculation.Sample)

Looks like there's some kind of bug.
0
- ago
#2
Dion has fixed it for build 17.
0
Best Answer

Reply

Bookmark

Sort