Welcome to the Traders Laboratory Forums.
Swing Trading and Position Trading Discussion forum for swing trading strategies, ideas, and insights. Shorter term swing trading and longer term position trading.

Like Tree1Likes

Reply
Old 06-25-2009, 11:18 AM   #49

Tams's Avatar

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

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: ProfLogic's Method

Quote:
Originally Posted by ch33ch »
Alright. I've attached three charts, each showing different calculated values for the Ergodic oscillator. I believe the last chart should be the correct one. I'm using a custom weighted moving average (as opposed to EL's WAverage) function for the smoothing. ....

why are you using a custom code?

if the anomaly is observed after the customization, then the error is in the customization.

Last edited by Tams; 06-25-2009 at 11:57 AM.
Tams is offline  
Reply With Quote
Old 06-25-2009, 11:22 AM   #50

Tams's Avatar

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

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: ProfLogic's Method

You cannot use a FC function inside a function.

I have highlighted the error in your code.





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

Variables:
	var0( 0 ),
	var1( 0 );

if CurrentBar = 1 then 
	begin
	for Value1 = 0 to Period - 1
		begin
		var0 = var0 + ( Period - Value1 ) * Price[Value1] ;
		end ;
	end
else
	var0 = var0[1] + Period * Price[0] - SummationFC(Price, Period) ;  {<---- error here}

var1 = ( Period + 1 ) * Period * .5 ;
WMA  = var0 / var1 ;

Last edited by Tams; 06-25-2009 at 11:55 AM.
Tams is offline  
Reply With Quote
Old 06-25-2009, 12:30 PM   #51

Join Date: Jun 2009
Location: Hong Kong
Posts: 6
Ignore this user

Thanks: 0
Thanked 3 Times in 2 Posts



Re: ProfLogic's Method

Thanks for pointing this out, Tams. I wasn't aware that you can not use FC within a function. Just out of curiosity, why not?

I'm using this version of the WMA because it is more efficient than WAverage. WAverage has to calculate a loop for each bar, and depending on the length of the smoothing period, these loops can slow down calculations considerably. From Logic's Ergodic oscillator parameters, it appears that triple smoothing is used, so this means that even more loops are calculated per bar.
ch33ch is offline  
Reply With Quote
Old 06-25-2009, 12:41 PM   #52

Tams's Avatar

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

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: ProfLogic's Method

Quote:
Originally Posted by ch33ch »
Thanks for pointing this out, Tams. I wasn't aware that you can not use FC within a function. Just out of curiosity, why not?

I'm using this version of the WMA because it is more efficient than WAverage. WAverage has to calculate a loop for each bar, and depending on the length of the smoothing period, these loops can slow down calculations considerably. From Logic's Ergodic oscillator parameters, it appears that triple smoothing is used, so this means that even more loops are calculated per bar.

re: these loops can slow down calculations considerably

this code was created 20 yrs ago for the computers of the day.
it won't make a difference with today's computer.


FC remembers the result from previous calculation, and makes a short cut for the current calculation.
This technique works fine inside an indicator, but the memory gets lost when it is called from within a function.


Try SUMMATION instead of SUMATIONFC, you will get the result you expect.
Tams is offline  
Reply With Quote
Old 06-25-2009, 02:38 PM   #53

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,272
Ignore this user

Thanks: 129
Thanked 1,038 Times in 694 Posts



Re: ProfLogic's Method

As an aside loops are generally a pretty poor way of averaging though they are 'unintuitively' what people seem to use. Sum the new point and drop the point n periods ago for the win
BlowFish is offline  
Reply With Quote
Old 06-27-2009, 09:15 PM   #54

Join Date: Feb 2009
Location: Buena Vista
Posts: 2
Ignore this user

Thanks: 2
Thanked 0 Times in 0 Posts



Re: ProfLogic's Method

For ch33ch - I tried to pm you, but it was rejected because I haven't posted on this board 5 times. I'll be happy to assist, but you will need to pm me w/ your email address. Standing by, if you're interested ...
tbone is offline  
Reply With Quote
Old 07-15-2009, 03:44 PM   #55

Join Date: Feb 2009
Location: Chicago
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts



Re: ProfLogic's Method

Any interest in reviving this thread?
El Guapo is offline  
Reply With Quote
Old 07-15-2009, 03:49 PM   #56

Logic's Avatar

Join Date: Feb 2009
Location: Ohio
Posts: 102
Ignore this user

Thanks: 9
Thanked 26 Times in 14 Posts



Re: ProfLogic's Method

I respond to all inquires. No one seems to care..
Nice to see you here
Logic is offline  
Reply With Quote

Reply

Tags
constant volume bar chart, cvb, ergodic, proflogic

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feltontrading Method sillykiddo Technical Analysis 13 05-19-2011 07:13 PM
ACD Method feb2865 Technical Analysis 28 05-10-2009 11:37 AM
SPM Method brownsfan019 The Candlestick Corner 42 02-17-2009 11:34 PM
This is My Method, Do You Think I'm on the Right Road? zugli Beginners Forum 16 02-13-2009 11:12 AM
Timing Method waveslider Market Analysis 69 07-02-2008 01:27 AM

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