RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        


«««1234

creating indicators Expand / Collapse
Message
Posted 8/14/2007 22:47:20 Post #3375
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
FYI, I have added documentation for these classes, which you should see in the next release.  I also capitalized the "V" in the "AddValue" method of the LinearRegressionQueue, and changed the name of the RegSlope and RegIntercept properties to just Slope and Intercept.  So if you have been using this class you will need to update your code slightly.

The count, length, or number of periods is specified using an argument passed to the constructor.  These calculations are optimized for iterative calculations, and the length can't be changed once the object has been created.  So I don't think there really needs to be a property for the number of periods.  We could add one, but it would be read only.

Thanks,
Daniel

Posted 8/15/2007 02:45:21 Post #3376
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
dplaisted (8/14/2007)
...changed the name of the RegSlope and RegIntercept properties to just Slope and Intercept.


The name "StdErr" is a misnomer. "Numerical recipes" calls this value "Chi". The name "StdErr" is widely used in modern statistic and refers to "StdErr / SQRT(N)".


dplaisted (8/14/2007)...So I don't think there really needs to be a property for the number of periods. We could add one, but it would be read only.

Of course, "period" is known and fixed. I need my own private variable to keep it if I need it somewhere else. Would be nice if the Queue would "explain" its properties...
Also "Length" could be "Period", while "Count" could be the number of valid data points currently in the queue.


www.finantic.de
Our Trading System at C2: Topaz
Posted 8/15/2007 18:32:32 Post #3377
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
DrKoch (8/15/2007)
The name "StdErr" is a misnomer. "Numerical recipes" calls this value "Chi". The name "StdErr" is widely used in modern statistic and refers to "StdErr / SQRT(N)".

We are using the formula from the book "Technical Analysis from A to Z".  It matches the STEYX() function in Excel, and is what is used in the Standard Error Channel indicator from that book.


Of course, "period" is known and fixed. I need my own private variable to keep it if I need it somewhere else. Would be nice if the Queue would "explain" its properties...
Also "Length" could be "Period", while "Count" could be the number of valid data points currently in the queue.

I have added a Period property to the various queues.  I didn't add a seperate Count property because I don't want people to get the two confused.

Thanks,
Daniel

Posted 8/15/2007 22:34:38 Post #3379
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
dplaisted (8/15/2007)

We are using the formula from the book "Technical Analysis from A to Z".


Well, I'm not sure if I'd take a book with "Technical Analysis" in its title as a reference when it comes to math, statistics and the like...

dplaisted (8/15/2007)

It matches the STEYX() function in Excel


So, why not call it steyx? Please avoid the well defined Name Standard Error in the wrong place.


www.finantic.de
Our Trading System at C2: Topaz
Posted 8/15/2007 22:41:46 Post #3380
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
I created a MinMaxQueue along with some nunit Tests for it (see attachment).
Please feel free to modify and use it as you like.


www.finantic.de
Our Trading System at C2: Topaz

  Post Attachments 
MinMaxQueue.cs (206 views, 3.38 KB)
Test_MinMaxQueue.cs (189 views, 2.49 KB)
Posted 8/21/2007 11:28:45 Post #3412
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
How do I use
ConstructorArgumentType.Enum

Could you show an example?



www.finantic.de
Our Trading System at C2: Topaz
Posted 8/21/2007 11:57:30 Post #3413
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
Funny you should ask, I was working with it yesterday.

It has a rather large problem in that it does not properly display a dropdown on the "Plot ??? Indicator" dialog.  It also has a problem dragging it directly to a system, after a system reload (it treats the value as an int and seems to forget that it is actually an enum).

I have problem reports in to get this squared away.

Here is how it should work:

.....

[ConstructorArgument(Name = "Performace Type", Type = ConstructorArgumentType.Enum, Value = PerformanceType.Bar, Order = 1)]

[ConstructorArgument(Name = "Periods", Type = ConstructorArgumentType.Integer, Value = 1, Order = 2)]

public Performance(PerformanceType performanceType, int periods)

....

And then later in my class I have a public enum defined as:

public enum PerformanceType

{ Bar, Day, Week, Month, Year, All }

I'm going to see if I can get the priority on this moved up, because once this is working correctly it really allows some interesting things in indicators.

Edit:  With your recent upload of that MinMax code and now asking about enums I wonder if we are treading down the same path of creating some useful utility indicators ...

Posted 8/21/2007 15:03:32 Post #3414
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
> I wonder if we are treading down the same path of creating some useful utility indicators

On my List:

LogReturns
Highest
Lowest
HiLoLimit
HiLoPctB
SROC
tDrift
Meander (Thomas Stritsman)
Approximate Entropy
Sample Entropy

-- System Stuff --
Equity Curve
Open Positions
etc..




www.finantic.de
Our Trading System at C2: Topaz
Posted 8/21/2007 15:46:18 Post #3415
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
I knocked out consecutive and I am working on a new performance indicator (code above pulled from there) which will let you pick a period resolution and then go back that many bars.  Was also planning on a Highest/Lowest with similar period resolutions, but I might wait for your implentation before starting that
« Prev Topic | Next Topic »

«««1234

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 5:04pm

2005-2007 © RightEdge Systems