Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 05-24-2009, 03:09 PM   #9

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,774
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Error Code Help Please

Quote:
Originally Posted by emptyvault »
oh , I just found that at MC home page .
There is vidya by Chande, let me see if it is the same old one .
thanks all .

don't just say "I found it".
For the benefit of all, and as a courtesy,
post a link of your find.
Tams is offline  
Reply With Quote
Old 05-24-2009, 03:28 PM   #10

Join Date: May 2008
Location: amsterdam
Posts: 114
Ignore this user

Thanks: 25
Thanked 38 Times in 30 Posts

Re: Error Code Help Please

this is from tradesignal enterprise should work with ts as well;
is this the vidya you were looking for

function "VIDYA"

Code:
Inputs: 
	Price( NumericSeries ), 
	Period( NumericSimple ),
	Smoothing( NumericSimple );

Variables: 
	absCMO, SC;

absCMO = Abs( CMO( Price, Period ) ) / 100;

SC = 2 / ( Smoothing + 1 );

If Currentbar > 1 And IsValid( VIDYA[1] ) Then 
	VIDYA = ( SC * absCMO * Price ) + ( 1 - ( SC * absCMO ) ) * VIDYA[1]
Else
	VIDYA = Price;
function "CMO" for VIDYA's calculation

Code:
Inputs:
	Price( NumericSeries ),
	Period( NumericSimple );

Variables:
	priceToday, pricePrev, sumUp, sumDown, i;

sumUp = 0; 
sumDown = 0;
For i = 0 To Period - 1 Begin
	priceToday = Price[i];
	pricePrev = Price[i+1];	
	If priceToday > pricePrev Then
		sumUp = sumUp + ( priceToday - pricePrev )
	Else If priceToday < pricePrev Then
		sumDown = sumDown + ( pricePrev - priceToday );
End;

If sumUp = 0 Then
	CMO = -100
Else If sumDown = 0 Then
	CMO = 100
Else If sumUp <> sumDown Then
	CMO = 100 * ( ( sumUp - sumDown ) / ( sumUp + sumDown ) )
Else
	CMO = 0;
VIDYA indicator

Code:
inputs: Price    ( Close ),
        Period   ( 14 ),
        Smoothing( 4 );

variables: myVIDYA(0);

myVIDYA = VIDYA( Price, Period, Smoothing );

plot1( myVIDYA,"VIDYA" );

Last edited by flyingdutchmen; 05-24-2009 at 03:34 PM.
flyingdutchmen is offline  
Reply With Quote
The Following User Says Thank You to flyingdutchmen For This Useful Post:
emptyvault (07-19-2009)
Old 07-19-2009, 12:21 PM   #11

Join Date: May 2009
Location: hong kong
Posts: 34
Ignore this user

Thanks: 9
Thanked 2 Times in 2 Posts

Re: Error Code Help Please

The indicator was on MC homepage so I guess not all of the readers like me to just copy and paste the material on here .
sorry if you feel it is improper to do so .
emptyvault is offline  
Reply With Quote

Reply

Tags
cmo

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Site Rendering Error Spydertrader Support Center 3 05-13-2009 10:29 PM
Error when Retrieving PMs brownsfan019 Support Center 4 04-21-2009 11:16 PM
Easylanguage Error #408 and #410?? isisisis Coding Forum 2 04-10-2009 06:30 PM
Future Data Error in TS Indicator blib Coding Forum 6 04-05-2009 04:09 PM
Url.dll Error - Help! brownsfan019 Tools of the Trade 5 09-16-2008 05:50 PM

All times are GMT -4. The time now is 06:04 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.