Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

plotting a sine wave Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
feltburner
Posted : Thursday, July 3, 2014 10:36:48 AM
Registered User
Joined: 1/16/2005
Posts: 72

Is it possible to plot a simple sine wave in Stockfinder?  The purpose would be use it as a way to trend-adjust other indicators by doing a comparison plot of an indicator with a one-period MA of the sine wave which could then be user-adjusted via the offset parameters in the MA edit box.

Bruce_L
Posted : Thursday, July 3, 2014 10:59:52 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Maybe something like the following?

'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.1 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Sine Wave
'|******************************************************************
'# Frequency = UserInput.Single = 0.05
Plot = Math.Sin(2 * Pi * Frequency * CurrentIndex)

The value of the above would be 0 at the first bar at the far left of the data and would have 20 bars from peak to peak (unless you changed the Frequency setting).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
feltburner
Posted : Thursday, July 3, 2014 11:58:23 AM
Registered User
Joined: 1/16/2005
Posts: 72

Exactly like that.  Thanks for the always excellent work.

-Bruce

Bruce_L
Posted : Thursday, July 3, 2014 12:36:03 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.