PureBytes Links
Trading Reference Links
|
Hi Jorgen,
Since you have not explained in details what you "method" is I took your example as a proxy what it is all about. Your code says quite explicitly : for any higher timeframe CURRENT period take values from PREVIOUS higher timeframe periods and add values from the current period but at the current lower resolution. That's what your code says and does when calculating Close for MA. I just made your code more efficient (it gives the same result) and compared the outcome (bright green color) to the outcome from the the "traditional" method (yellow color). For illustration purposes I marked higher timeframe bars (histogram) and indicated CLOSE from higher timeframe on lower timeframe (red color). This is all I have done. The difference is quite explicit: MA does not wait till the end of the higher time period, but includes current lower timeframe values. Therefor MA is either lower (down trend) or higher (up trend) when comparing to traditional method. The alternative method would be to calculate MA on lower timeframe equivalent to period = Period of the higher timeframe * (interval of the higher timeframe / interval of the lower timeframe) eg. MA(C,10) on 15min chart would be equivalent to MA(c,150) on 1min chart.
Regards,
AF
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|