Profile Picture

MACD of ratio

Posted By billb 13 Years Ago
Posted Tuesday December 05 2006
This example shows how to calculate the ratio of prices for two symbols, and a MACD of that ratio.

The system can be downloaded by clicking here

Posted Sunday August 31 2008

New to RE, as well as C#. Tried downloading the ratio trading system, but it won't compile....

I get 4 error messages that don't really mean a lot to me Smile

'ISeries.Values' in explicit interface is not a member of interface

'DataSeries' does not implement interface member 'RightEdge.Common.Iseries.LookBack(int)


Any advice on how to go about?



Posted Monday September 01 2008
That trading system is out of date.  In the current version of RightEdge it would actually be be a lot easier to do this.  The "Developing Trading Systems in RightEdge" section of the help has some information that should help you with this.  If you still need help I can try to update this system.


Posted Monday September 01 2008
Thanks Daniel, that looked a whole lot easier, will give it a try!

BTW, how do I know that a new bar has been built for BOTH symbols for which I am trying to calculate the ratio...? Is there a separate event that fires when all symbols in a folder have had a bar generated for the same period?
Posted Monday September 01 2008
The bars and indicators for both symbols will have been updated before the NewBar method in your symbol script is called for either symbol.

If you need to run some code before or after all of the symbol script NewBar methods have been called, override the NewBar method of the system class.  The base version of this will call the symbol script NewBar methods, so you can call base.NewBar() and then do whatever you want to do after they have all been processed.  If you want to control the order the symbols are processed in, you can leave the call to base.NewBar() out and call NewBar() on each symbol script yourself.


Similar Topics

Reading This Topic

2005-2019 © RightEdge Systems