| Swing Trading and Position Trading Discussion forum for swing trading strategies, ideas, and insights. Shorter term swing trading and longer term position trading. |
![]() | | Tweet | |
| | #49 | ||
![]() | Re: ProfLogic's Method Quote:
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. | ||
| |
|
| | #50 | ||
![]() | Re: ProfLogic's Method 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. | ||
| |
|
| | #51 | ||
![]() | Re: ProfLogic's Method 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. | ||
| |
|
| | #52 | ||
![]() | Re: ProfLogic's Method Quote:
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. | ||
| |
|
| | #53 | ||
![]() | Re: ProfLogic's Method | ||
| |
|
| | #54 | ||
![]() | Re: ProfLogic's Method | ||
| |
|
| | #55 | ||
![]() | Re: ProfLogic's Method | ||
| |
|
![]() |
| Tags |
| constant volume bar chart, cvb, ergodic, proflogic |
| Thread Tools | Search this Thread |
| 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 |