I would like to help me in the calculation of return series in a chartscript. I tried the following but i have a signal: Not a method!
SPXRET := ( SPX( Bar, #Close ) - SPX( Bar - 1, #Close ) ) / SPX( Bar - 1, #Close ) + 1;
Any idea?
Size:
Color:
Manolis,
Note that you were posting your question -
1) in three topics at the same time (known as crossposting),
2) in others' threads (dedicated to their particular problems which does not apply to your question in any way - known as offtopic),
3) in .NET topics (despite the code snippet looks like WL4 and there's a mention of the word chartscript).
What's SPX? What is "return"?
Size:
Color:
Well, here's the code for the two versions. You'll see that Version 5 is a little bit friendlier when it comes to series math -
Version 5 (Execute method code)
CODE:
Please log in to see this code.
Version 4
CODE:
Please log in to see this code.
Size:
Color: